Skip to content

Instantly share code, notes, and snippets.

@nlf
Created November 1, 2012 17:43
Show Gist options
  • Save nlf/3995302 to your computer and use it in GitHub Desktop.
Save nlf/3995302 to your computer and use it in GitHub Desktop.
butils benchmark
100,000,000 iterations of each function. lines starting with Buffer# are the core implementations, those with butils# are mine.
Buffer#writeInt8: 15230ms
butils#writeInt: 165ms
Buffer#readInt8: 3074ms
butils#readInt: 162ms
Buffer#writeUInt32BE: 9873ms
butils#writeInt32: 258ms
Buffer#readUInt32BE: 4405ms
butils#readInt32: 322ms
Buffer#write: 46346ms
butils#writeString: 2414ms
Buffer#toString: 17275ms
butils#readString: 7516ms
butils#writeVarint: 1273ms
butils#readVarint: 4426ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment