yetzt / node-rgbcolor

A nodejs module to parse color values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perf tested - unrolling doubles speed.

PlNG opened this issue · comments

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?

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