Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feyeleanor/5380430 to your computer and use it in GitHub Desktop.
Save feyeleanor/5380430 to your computer and use it in GitHub Desktop.
Run of http://github.com/feyeleanor/gospeed on 2012 Aluminium MacBook 2.5GHz Core i5 with 16GB RAM using Go 1.1beta 2 revision d58997478ec6
bash-3.2# go test -test.bench="Benchmark" github.com/feyeleanor/gospeed
PASS
BenchmarkBaselineCastInt32ToInt 2000000000 0.37 ns/op
BenchmarkBaselineCastIntToInt32 2000000000 0.34 ns/op
BenchmarkBaselineCastInt64ToUint64 2000000000 0.34 ns/op
BenchmarkBaselineCastUint64ToInt64 2000000000 0.34 ns/op
BenchmarkBaselineVariableGet 2000000000 0.35 ns/op
BenchmarkBaselineVariableSet 2000000000 0.34 ns/op
BenchmarkBaselineVariableGetInterface 2000000000 0.34 ns/op
BenchmarkBaselineVariableSetInterface 2000000000 0.68 ns/op
BenchmarkBaselineVariableIncrement 1000000000 2.05 ns/op
BenchmarkBaselineVariableDecrement 1000000000 2.02 ns/op
BenchmarkBaselineVariableIntegerAdd 2000000000 0.34 ns/op
BenchmarkBaselineVariableIntegerSubtract 2000000000 0.34 ns/op
BenchmarkBaselineVariableIntegerMultiply 2000000000 0.34 ns/op
BenchmarkBaselineVariableIntegerDivide 2000000000 0.34 ns/op
BenchmarkBaselineVariableIntegerRemainder 2000000000 0.34 ns/op
BenchmarkBaselineFieldGet 2000000000 0.35 ns/op
BenchmarkBaselineFieldSet 2000000000 0.35 ns/op
BenchmarkBaselineSliceGet 2000000000 0.68 ns/op
BenchmarkBaselineSliceSet 2000000000 0.69 ns/op
BenchmarkBaselineMethodGetSlice 200000000 9.19 ns/op
BenchmarkBaselineMethodSetSlice 200000000 9.54 ns/op
BenchmarkBaselineMethodInterfaceGetSlice 100000000 13.2 ns/op
BenchmarkBaselineMethodInterfaceSetSlice 100000000 12.8 ns/op
BenchmarkBaselineMapIntGet 100000000 18.3 ns/op
BenchmarkBaselineMapIntSet 50000000 37.9 ns/op
BenchmarkBaselineMapStringGet 100000000 24.4 ns/op
BenchmarkBaselineMapStringSet 50000000 45.0 ns/op
BenchmarkBaselineIf 2000000000 0.67 ns/op
BenchmarkBaselineIfElse 2000000000 0.67 ns/op
BenchmarkBaselineSwitchDefault 2000000000 0.34 ns/op
BenchmarkBaselineSwitchOneCase 2000000000 0.70 ns/op
BenchmarkBaselineSwitchTwoCases 2000000000 1.45 ns/op
BenchmarkBaselineSwitchTwoCasesFallthrough 2000000000 1.37 ns/op
BenchmarkBaselineForLoopIteration 2000000000 1.01 ns/op
BenchmarkBaselineForReverseLoopIteration 2000000000 1.01 ns/op
BenchmarkBaselineForRange 2000000000 1.01 ns/op
BenchmarkBaselineForSliceLength 2000000000 1.01 ns/op
BenchmarkBaselineForReverseSliceLength 2000000000 1.00 ns/op
BenchmarkBaselineForLoopIteration10 100000000 10.1 ns/op
BenchmarkBaselineForReverseLoopIteration10 500000000 5.38 ns/op
BenchmarkBaselineForRange10 500000000 4.92 ns/op
BenchmarkBaselineForSliceLength10 500000000 4.91 ns/op
BenchmarkBaselineForReverseSliceLength10 500000000 5.27 ns/op
BenchmarkBaselineForLoopIteration100 50000000 54.1 ns/op
BenchmarkBaselineForReverseLoopIteration100 50000000 64.2 ns/op
BenchmarkBaselineForRange100 50000000 54.3 ns/op
BenchmarkBaselineForSliceLength100 50000000 54.3 ns/op
BenchmarkBaselineForReverseSliceLength100 50000000 54.7 ns/op
BenchmarkBaselineForLoopIteration10000 500000 3403 ns/op
BenchmarkBaselineForReverseLoopIteration10000 500000 3436 ns/op
BenchmarkBaselineForRange10000 500000 3386 ns/op
BenchmarkBaselineForSliceLength10000 500000 3399 ns/op
BenchmarkBaselineForReverseSliceLength10000 500000 3431 ns/op
BenchmarkBaselineMakeChannelBoolUnbuffered 20000000 122 ns/op
BenchmarkBaselineMakeChannelBool1 20000000 121 ns/op
BenchmarkBaselineMakeChannelBool10 10000000 150 ns/op
BenchmarkBaselineMakeChannelStringUnbuffered 10000000 132 ns/op
BenchmarkBaselineMakeChannelString1 10000000 156 ns/op
BenchmarkBaselineMakeChannelString10 10000000 183 ns/op
BenchmarkBaselineGo 1000000 50789 ns/op
BenchmarkBaselineChannelClose 50000000 56.4 ns/op
BenchmarkBaselineSyncBoolChannelWrite1 5000000 482 ns/op
BenchmarkBaselineSyncBoolChannelWrite10 1000000 1929 ns/op
BenchmarkBaselineASyncBoolChannelWrite1 20000000 96.9 ns/op
BenchmarkBaselineASyncBoolChannelWrite10 5000000 482 ns/op
BenchmarkBaselineSyncStringChannelWrite1 5000000 481 ns/op
BenchmarkBaselineSyncStringChannelWrite10 1000000 2037 ns/op
BenchmarkBaselineASyncStringChannelWrite1 20000000 101 ns/op
BenchmarkBaselineASyncStringChannelWrite10 5000000 493 ns/op
BenchmarkBaselineFunctionCall 1000000000 2.70 ns/op
BenchmarkBaselineFunctionCallArg 1000000000 2.74 ns/op
BenchmarkBaselineFunctionCall5VarArgs 20000000 148 ns/op
BenchmarkBaselineFunctionCallInt 1000000000 2.37 ns/op
BenchmarkBaselineFunctionCall5VarInts 50000000 103 ns/op
BenchmarkBaselineFunctionCallWithDefer 20000000 133 ns/op
BenchmarkBaselineFunctionCallPanicRecover 10000000 267 ns/op
BenchmarkBaselineMethodCallDirect 200000000 8.44 ns/op
BenchmarkBaselineMethodCallDirect1Arg 200000000 8.75 ns/op
BenchmarkBaselineMethodCallDirect1Int 200000000 8.59 ns/op
BenchmarkBaselineMethodCallDirect5Args 100000000 22.6 ns/op
BenchmarkBaselineMethodCallDirect5Ints 100000000 28.1 ns/op
BenchmarkBaselineMethodCallIndirect 2000000000 0.34 ns/op
BenchmarkBaselineMethodCallIndirect1Arg 2000000000 0.67 ns/op
BenchmarkBaselineMethodCallIndirect1Int 2000000000 0.34 ns/op
BenchmarkBaselineMethodCallIndirect5Args 100000000 14.2 ns/op
BenchmarkBaselineMethodCallIndirect5Ints 100000000 20.3 ns/op
BenchmarkBaselineTypeAssertion 100000000 12.1 ns/op
BenchmarkBaselineTypeAssertionEmptyInterface 500000000 4.39 ns/op
BenchmarkBaselineTypeAssertionInterface1 100000000 18.9 ns/op
BenchmarkBaselineTypeAssertionInterface2 100000000 19.4 ns/op
BenchmarkBaselineTypeReflectPrimitiveToValue 500000000 6.12 ns/op
BenchmarkBaselineTypeReflectSliceToValue 50000000 86.5 ns/op
BenchmarkBaselineTypeReflectStructToValue 20000000 152 ns/op
BenchmarkBaselineTypeCheck 500000000 3.04 ns/op
BenchmarkBaselineTypeCheckEmptyInterface 500000000 3.69 ns/op
BenchmarkBaselineTypeCheckInterface1 100000000 17.6 ns/op
BenchmarkBaselineTypeCheckInterface2 100000000 18.4 ns/op
BenchmarkBaselineTypeSwitchOneCase 500000000 5.42 ns/op
BenchmarkBaselineTypeSwitchBasicTypesCase 200000000 8.85 ns/op
BenchmarkBaselineTypeSwitchEmptyInterface 500000000 5.98 ns/op
BenchmarkBaselineTypeSwitchInterface1 100000000 20.1 ns/op
BenchmarkBaselineTypeSwitchInterface2 100000000 20.3 ns/op
BenchmarkBaselineNewStructureLiteral 200000000 8.39 ns/op
BenchmarkBaselineNewStructure 100000000 17.6 ns/op
BenchmarkBaselineNewSliceLiteral 1000000000 3.03 ns/op
BenchmarkBaselineNewSlice 50000000 80.2 ns/op
BenchmarkBaselineNewMapLiteralIntToInt 20000000 160 ns/op
BenchmarkBaselineNewMapLiteralIntToInterface 20000000 160 ns/op
BenchmarkBaselineNewMapLiteralStringToInt 20000000 158 ns/op
BenchmarkBaselineNewMapLiteralStringToInterface 20000000 160 ns/op
BenchmarkBaselineNewMapLiteralIntToInt2Item 10000000 415 ns/op
BenchmarkBaselineNewMapLiteralIntToInterface2Item 5000000 482 ns/op
BenchmarkBaselineNewMapLiteralStringToInt2Item 5000000 507 ns/op
BenchmarkBaselineNewMapLiteralStringToInterface2Item 5000000 561 ns/op
BenchmarkBaselineNewMapIntToInt 20000000 157 ns/op
BenchmarkBaselineNewMapIntToInterface 20000000 158 ns/op
BenchmarkBaselineNewMapStringToInt 20000000 159 ns/op
BenchmarkBaselineNewMapStringToInterface 20000000 164 ns/op
BenchmarkBaselineSliceCopy 50000000 35.5 ns/op
BenchmarkBaselineNewSliceAppendElement1 20000000 122 ns/op
BenchmarkBaselineNewSliceAppendElement10 20000000 213 ns/op
ok github.com/feyeleanor/gospeed 532.715s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment