Re:Texgen.js – Lightweight Procedural Texture Generator
by bgtnhz on Sunday January 25, 2015 @09:09PM
(#8945224)
I fail to see the logic behind optimizing around conditionals when you are running in an interpreted language.
Re:Texgen.js – Lightweight Procedural Texture Generator
by mrdoob2 on Sunday January 25, 2015 @09:13PM
(#8945233)
I instrumented the code and using conditionals resulted in 2x the generation time per loop. These loops are executed only once so the VM doesn't have a chance to optimise them.
Re:Texgen.js – Lightweight Procedural Texture Generator
by gavanwoolery on Monday January 26, 2015 @12:27AM
(#8945644)
I've done similar in the past and can concur that it does have large performance benefits, at least in Chrome where I tested it.
Re:Texgen.js – Lightweight Procedural Texture Generator
by flohofwoe on Monday January 26, 2015 @05:43AM
(#8946390)
Stating the obvious, but I'm pretty sure that there are no longer any purely interpreting JS engines around, it's all JIT or AOT compiled, so optimizing for a compilation scenario definitely makes sense.
If someone knows a better way I'm all ears!