FGRibreau / node-language-detect

🇫🇷 NodeJS language detection library using n-gram
http://blog.fgribreau.com/2011/07/week-end-project-nodejs-language.html
MIT License
399 stars 45 forks source link

Buble sorting? #19

Closed alexbeletsky closed 11 years ago

alexbeletsky commented 11 years ago

Hey guys, I think it's sweet module - I quickly glanced at code, I can see https://github.com/FGRibreau/node-language-detect/blob/master/lib/Parser.js#L221 you are implementing your own buble sorting algorithm.

Buble sorting are famous as not the best algorithm, my question is why it's been used and why Array.sort is not?

RuslanZavacky commented 11 years ago

Take one more glance :) There is a special comment, why we do that, and we are using .sort withing this function also. But I can say, it totally can be improved dramatically, but that needs time :)

alexbeletsky commented 11 years ago

cleared, thanks!