yetzt/node-rgbcolor

Perf tested - unrolling doubles speed.

PlNG opened this issue · 2 comments

PlNG commented

It looks like unrolling the program (removing both of the loops) doubles its speed based on a crude perf test implementing code coverage, but that little line change that I proposed (which logically made sense) in a previous issue didn't do a thing (JIT inline optimized). Whoops.

http://jsperf.com/stoyan-s-rgbcolor-js

Input needs to be tested that it's a string or it'll throw errors.

@PlNG it looks like jsperf is down now, can you create a PR instead?

yetzt commented

@ping feel free to provide a pull request any time.