brain icon indicating copy to clipboard operation
brain copied to clipboard

Unroll loops and data within toFunction()

Open ckknight opened this issue 10 years ago • 2 comments

This should be functionality equivalent to before, and the unit tests remain green. The resultant function should be much more friendly to the JITter, as it contains object accesses at the top, several pure math executions (which the JITter could theoretically parallelize), and an object create upon return. A greater-than 10x speedup was observed with the new method.

ckknight avatar Jul 17 '15 01:07 ckknight

I'm curious what this looks like, as source, before and after. Do you have the performance numbers, and the project they ran on? Very interesting stuff!

robertleeplummerjr avatar Dec 21 '16 02:12 robertleeplummerjr

Would you consider closing this here, and reopening at: https://github.com/harthur-org/brain.js/pulls?

If so, we could add you as a collaborator.

robertleeplummerjr avatar Dec 21 '16 02:12 robertleeplummerjr