-
Committer:
John Arbash Meinel
-
Date:
2011-05-27 13:22:01 UTC
-
Revision ID:
john@arbash-meinel.com-20110527132201-ds4y829a5a01aavr
It appears go authors are no strangers to assembly optimizations.
Changing from bytes.Index() to a custom 'memchr' function dropped the time from
478ms down to ~324ms. However bytes.IndexByte() is assembly code, that even uses
SSE instructions to chunk through memory quickly, and drops it all the way down
to 283ms.
Still 283ms vs Pyrex 164ms, but I didn't expect to shave 195ms off the go time
by a simple switch of bytes.Index to bytes.IndexByte.