harthur / brain

Simple feed-forward neural network in JavaScript
MIT License
8.01k stars 857 forks source link

use slimmer lodash #50

Closed breadbaker closed 9 years ago

breadbaker commented 10 years ago

to replace underscore verison non compatible with other modern libraries dependant on _

kurttheviking commented 10 years ago

:+1:

nickpoorman commented 10 years ago

+1 - I'm all for this. I suspect there will be a speedup as well.

harthur commented 9 years ago

Thanks for this. It's my understanding that lodash is bigger in size than underscore. There won't be much speedup as underscore is only used in peripheral code and not in any critical paths. Let me know if there's another reason, however.

breadbaker commented 9 years ago

Thats interesting you are right underscore is about a 3rd the size of lodash.

The main reason is compatibility. The version of underscore currently in place doesn't play well with other libraries.

On Fri, Nov 28, 2014 at 5:24 PM, Heather Arthur notifications@github.com wrote:

Thanks for this. It's my understanding that lodash is bigger in size than underscore. There won't be much speedup as underscore is only used in peripheral code and not in any critical paths. Let me know if there's another reason, however.

— Reply to this email directly or view it on GitHub https://github.com/harthur/brain/pull/50#issuecomment-64936149.

harthur commented 9 years ago

As brain is built into a browser file using browserify, I'm going to forgo making that file any bigger.

Compatibility with other libraries shouldn't matter. With node the deps are local in the nodemodules folder, and in the browser `` doesn't leak out. Correct me if I'm wrong.

breadbaker commented 9 years ago

This is unfortunate as now I'd need to include two versions of underscore. But whatever.

On Sat, Nov 29, 2014 at 11:24 AM, Heather Arthur notifications@github.com wrote:

Closed #50 https://github.com/harthur/brain/pull/50.

— Reply to this email directly or view it on GitHub https://github.com/harthur/brain/pull/50#event-200170477.