Skip to content

Instantly share code, notes, and snippets.

@hajimehoshi
Last active November 7, 2021 15:01
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 hajimehoshi/8154b02630e2bb300a56ccb235dafb37 to your computer and use it in GitHub Desktop.
Save hajimehoshi/8154b02630e2bb300a56ccb235dafb37 to your computer and use it in GitHub Desktop.
Benchmark (Go (GOOS=darwin) vs Go (GOOS=js) vs go2cpp@v0.1.3)
name old time/op new time/op delta
SprintfPadding 221ns ± 2% 748ns ± 1% +238.78% (p=0.008 n=5+5)
SprintfEmpty 18.8ns ± 1% 111.3ns ± 3% +490.87% (p=0.008 n=5+5)
SprintfString 51.4ns ± 0% 246.9ns ± 3% +379.98% (p=0.016 n=4+5)
SprintfTruncateString 94.0ns ± 1% 359.7ns ± 1% +282.49% (p=0.008 n=5+5)
SprintfTruncateBytes 92.0ns ± 2% 362.8ns ± 1% +294.35% (p=0.008 n=5+5)
SprintfSlowParsingPath 62.4ns ± 3% 281.0ns ± 1% +350.13% (p=0.008 n=5+5)
SprintfQuoteString 357ns ± 1% 1304ns ± 2% +264.88% (p=0.008 n=5+5)
SprintfInt 42.3ns ± 1% 228.4ns ± 8% +439.50% (p=0.008 n=5+5)
SprintfIntInt 83.2ns ± 1% 391.2ns ± 0% +370.36% (p=0.008 n=5+5)
SprintfPrefixedInt 117ns ± 0% 597ns ± 2% +408.92% (p=0.016 n=4+5)
SprintfFloat 132ns ± 1% 670ns ± 1% +407.56% (p=0.008 n=5+5)
SprintfComplex 473ns ± 2% 1247ns ± 1% +163.90% (p=0.008 n=5+5)
SprintfBoolean 52.2ns ± 1% 229.7ns ± 3% +339.71% (p=0.008 n=5+5)
SprintfHexString 140ns ± 4% 491ns ± 1% +251.19% (p=0.008 n=5+5)
SprintfHexBytes 174ns ± 6% 655ns ± 6% +275.81% (p=0.008 n=5+5)
SprintfBytes 326ns ± 1% 1534ns ± 4% +370.73% (p=0.008 n=5+5)
SprintfStringer 280ns ± 1% 1019ns ±19% +263.63% (p=0.008 n=5+5)
SprintfStructure 1.04µs ± 0% 4.53µs ± 1% +336.20% (p=0.008 n=5+5)
ManyArgs 286ns ± 1% 1334ns ± 4% +365.71% (p=0.008 n=5+5)
FprintInt 45.3ns ± 0% 213.4ns ± 4% +370.79% (p=0.008 n=5+5)
FprintfBytes 74.2ns ± 1% 354.7ns ± 4% +377.86% (p=0.008 n=5+5)
FprintIntNoAlloc 45.5ns ± 1% 215.0ns ±11% +372.49% (p=0.008 n=5+5)
ScanInts 220µs ± 5% 851µs ± 7% +287.71% (p=0.008 n=5+5)
ScanRecursiveInt 32.1ms ± 1% 107.7ms ± 7% +235.56% (p=0.008 n=5+5)
ScanRecursiveIntReaderWrapper 38.0ms ± 2% 107.2ms ± 1% +182.08% (p=0.008 n=5+5)
name old time/op new time/op delta
SprintfPadding 882ns ± 0% 748ns ± 1% -15.25% (p=0.008 n=5+5)
SprintfEmpty 95.9ns ± 8% 111.3ns ± 3% +16.11% (p=0.008 n=5+5)
SprintfString 256ns ±11% 247ns ± 3% ~ (p=0.310 n=5+5)
SprintfTruncateString 409ns ± 1% 360ns ± 1% -12.02% (p=0.008 n=5+5)
SprintfTruncateBytes 400ns ± 1% 363ns ± 1% -9.22% (p=0.008 n=5+5)
SprintfSlowParsingPath 272ns ± 0% 281ns ± 1% +3.45% (p=0.016 n=4+5)
SprintfQuoteString 1.31µs ± 1% 1.30µs ± 2% ~ (p=0.151 n=5+5)
SprintfInt 202ns ± 0% 228ns ± 8% +13.27% (p=0.008 n=5+5)
SprintfIntInt 371ns ± 0% 391ns ± 0% +5.41% (p=0.008 n=5+5)
SprintfPrefixedInt 464ns ± 1% 597ns ± 2% +28.69% (p=0.008 n=5+5)
SprintfFloat 680ns ± 1% 670ns ± 1% ~ (p=0.056 n=5+5)
SprintfComplex 1.66µs ± 1% 1.25µs ± 1% -24.63% (p=0.008 n=5+5)
SprintfBoolean 223ns ± 1% 230ns ± 3% +2.87% (p=0.008 n=5+5)
SprintfHexString 546ns ± 3% 491ns ± 1% -10.12% (p=0.008 n=5+5)
SprintfHexBytes 691ns ± 1% 655ns ± 6% ~ (p=0.151 n=5+5)
SprintfBytes 1.29µs ± 1% 1.53µs ± 4% +19.19% (p=0.008 n=5+5)
SprintfStringer 1.08µs ± 1% 1.02µs ±19% ~ (p=0.135 n=5+5)
SprintfStructure 4.81µs ± 3% 4.53µs ± 1% -5.86% (p=0.008 n=5+5)
ManyArgs 1.39µs ±19% 1.33µs ± 4% ~ (p=1.000 n=5+5)
FprintInt 235ns ± 4% 213ns ± 4% -9.08% (p=0.008 n=5+5)
FprintfBytes 360ns ± 3% 355ns ± 4% ~ (p=0.690 n=5+5)
FprintIntNoAlloc 249ns ±11% 215ns ±11% -13.81% (p=0.032 n=5+5)
ScanInts 1.05ms ± 5% 0.85ms ± 7% -19.09% (p=0.008 n=5+5)
ScanRecursiveInt 106ms ± 5% 108ms ± 7% ~ (p=1.000 n=5+5)
ScanRecursiveIntReaderWrapper 105ms ± 2% 107ms ± 1% ~ (p=0.056 n=5+5)
BenchmarkSprintfPadding 1528808 746.0 ns/op
BenchmarkSprintfPadding 1615760 748.7 ns/op
BenchmarkSprintfPadding 1588669 749.9 ns/op
BenchmarkSprintfPadding 1611266 742.2 ns/op
BenchmarkSprintfPadding 1613473 752.0 ns/op
BenchmarkSprintfEmpty 10900682 110.4 ns/op
BenchmarkSprintfEmpty 10493542 109.7 ns/op
BenchmarkSprintfEmpty 10922862 113.1 ns/op
BenchmarkSprintfEmpty 10885212 108.9 ns/op
BenchmarkSprintfEmpty 10881678 114.5 ns/op
BenchmarkSprintfString 4836009 255.2 ns/op
BenchmarkSprintfString 4536165 245.5 ns/op
BenchmarkSprintfString 4807815 246.6 ns/op
BenchmarkSprintfString 4932840 243.5 ns/op
BenchmarkSprintfString 4862934 243.6 ns/op
BenchmarkSprintfTruncateString 3338294 357.4 ns/op
BenchmarkSprintfTruncateString 3264865 365.0 ns/op
BenchmarkSprintfTruncateString 3370506 355.7 ns/op
BenchmarkSprintfTruncateString 3359100 356.0 ns/op
BenchmarkSprintfTruncateString 3371976 364.5 ns/op
BenchmarkSprintfTruncateBytes 3236904 365.2 ns/op
BenchmarkSprintfTruncateBytes 3325213 364.1 ns/op
BenchmarkSprintfTruncateBytes 3305280 365.1 ns/op
BenchmarkSprintfTruncateBytes 3310424 359.9 ns/op
BenchmarkSprintfTruncateBytes 3330172 359.7 ns/op
BenchmarkSprintfSlowParsingPath 4272124 281.4 ns/op
BenchmarkSprintfSlowParsingPath 4233280 282.4 ns/op
BenchmarkSprintfSlowParsingPath 4299601 280.4 ns/op
BenchmarkSprintfSlowParsingPath 4274157 281.0 ns/op
BenchmarkSprintfSlowParsingPath 4154430 279.7 ns/op
BenchmarkSprintfQuoteString 910759 1297 ns/op
BenchmarkSprintfQuoteString 905629 1299 ns/op
BenchmarkSprintfQuoteString 918044 1301 ns/op
BenchmarkSprintfQuoteString 918196 1326 ns/op
BenchmarkSprintfQuoteString 909375 1296 ns/op
BenchmarkSprintfInt 5510358 221.7 ns/op
BenchmarkSprintfInt 5323562 246.0 ns/op
BenchmarkSprintfInt 5360119 235.2 ns/op
BenchmarkSprintfInt 5507396 219.4 ns/op
BenchmarkSprintfInt 5458704 219.5 ns/op
BenchmarkSprintfIntInt 3053781 392.3 ns/op
BenchmarkSprintfIntInt 3077288 390.3 ns/op
BenchmarkSprintfIntInt 3078994 392.0 ns/op
BenchmarkSprintfIntInt 3073900 392.2 ns/op
BenchmarkSprintfIntInt 3092834 389.4 ns/op
BenchmarkSprintfPrefixedInt 2025504 599.8 ns/op
BenchmarkSprintfPrefixedInt 2013967 592.9 ns/op
BenchmarkSprintfPrefixedInt 2028627 593.7 ns/op
BenchmarkSprintfPrefixedInt 2022962 608.6 ns/op
BenchmarkSprintfPrefixedInt 2022264 591.7 ns/op
BenchmarkSprintfFloat 1790076 665.6 ns/op
BenchmarkSprintfFloat 1780893 670.5 ns/op
BenchmarkSprintfFloat 1798321 670.3 ns/op
BenchmarkSprintfFloat 1787692 676.7 ns/op
BenchmarkSprintfFloat 1759002 668.3 ns/op
BenchmarkSprintfComplex 987186 1242 ns/op
BenchmarkSprintfComplex 950403 1240 ns/op
BenchmarkSprintfComplex 963764 1252 ns/op
BenchmarkSprintfComplex 966312 1257 ns/op
BenchmarkSprintfComplex 964155 1246 ns/op
BenchmarkSprintfBoolean 5224302 228.9 ns/op
BenchmarkSprintfBoolean 5244564 228.7 ns/op
BenchmarkSprintfBoolean 5250523 227.7 ns/op
BenchmarkSprintfBoolean 5237182 227.2 ns/op
BenchmarkSprintfBoolean 5297698 235.8 ns/op
BenchmarkSprintfHexString 2431543 490.1 ns/op
BenchmarkSprintfHexString 2418168 490.6 ns/op
BenchmarkSprintfHexString 2428059 494.5 ns/op
BenchmarkSprintfHexString 2438206 487.3 ns/op
BenchmarkSprintfHexString 2429914 492.7 ns/op
BenchmarkSprintfHexBytes 1875282 638.0 ns/op
BenchmarkSprintfHexBytes 1875496 631.3 ns/op
BenchmarkSprintfHexBytes 1906447 675.5 ns/op
BenchmarkSprintfHexBytes 1849189 697.2 ns/op
BenchmarkSprintfHexBytes 1634005 634.7 ns/op
BenchmarkSprintfBytes 800047 1511 ns/op
BenchmarkSprintfBytes 805362 1550 ns/op
BenchmarkSprintfBytes 796336 1504 ns/op
BenchmarkSprintfBytes 726016 1515 ns/op
BenchmarkSprintfBytes 794004 1591 ns/op
BenchmarkSprintfStringer 1000000 1210 ns/op
BenchmarkSprintfStringer 1000000 1021 ns/op
BenchmarkSprintfStringer 1231794 947.8 ns/op
BenchmarkSprintfStringer 1258873 957.7 ns/op
BenchmarkSprintfStringer 1244396 956.8 ns/op
BenchmarkSprintfStructure 267500 4528 ns/op
BenchmarkSprintfStructure 257830 4553 ns/op
BenchmarkSprintfStructure 264465 4517 ns/op
BenchmarkSprintfStructure 264159 4528 ns/op
BenchmarkSprintfStructure 257083 4504 ns/op
BenchmarkManyArgs 923352 1313 ns/op
BenchmarkManyArgs 937590 1381 ns/op
BenchmarkManyArgs 932724 1303 ns/op
BenchmarkManyArgs 912457 1369 ns/op
BenchmarkManyArgs 946642 1303 ns/op
BenchmarkFprintInt 5577909 215.5 ns/op
BenchmarkFprintInt 5853990 214.1 ns/op
BenchmarkFprintInt 5550880 205.7 ns/op
BenchmarkFprintInt 5586735 216.0 ns/op
BenchmarkFprintInt 4969281 215.5 ns/op
BenchmarkFprintfBytes 3536648 341.4 ns/op
BenchmarkFprintfBytes 3519558 363.9 ns/op
BenchmarkFprintfBytes 3511406 340.1 ns/op
BenchmarkFprintfBytes 3476722 362.0 ns/op
BenchmarkFprintfBytes 3538486 365.9 ns/op
BenchmarkFprintIntNoAlloc 5844762 204.3 ns/op
BenchmarkFprintIntNoAlloc 5901308 238.8 ns/op
BenchmarkFprintIntNoAlloc 5637907 213.7 ns/op
BenchmarkFprintIntNoAlloc 5788581 214.9 ns/op
BenchmarkFprintIntNoAlloc 5593194 203.3 ns/op
BenchmarkScanInts 1455 830190 ns/op
BenchmarkScanInts 1430 840173 ns/op
BenchmarkScanInts 1430 843110 ns/op
BenchmarkScanInts 1442 835941 ns/op
BenchmarkScanInts 1396 907797 ns/op
BenchmarkScanRecursiveInt 10 105576954 ns/op
BenchmarkScanRecursiveInt 10 111406572 ns/op
BenchmarkScanRecursiveInt 9 115502979 ns/op
BenchmarkScanRecursiveInt 10 102832351 ns/op
BenchmarkScanRecursiveInt 10 103235618 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 106883357 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 107424422 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 106560416 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 108625363 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 106733380 ns/op
PASS
BenchmarkSprintfPadding 5166020 220.4 ns/op
BenchmarkSprintfPadding 5425286 225.0 ns/op
BenchmarkSprintfPadding 5487025 219.4 ns/op
BenchmarkSprintfPadding 5219884 219.0 ns/op
BenchmarkSprintfPadding 5397338 219.8 ns/op
BenchmarkSprintfEmpty 65063356 18.89 ns/op
BenchmarkSprintfEmpty 65040816 18.74 ns/op
BenchmarkSprintfEmpty 64616158 18.75 ns/op
BenchmarkSprintfEmpty 60942889 18.81 ns/op
BenchmarkSprintfEmpty 64708005 19.01 ns/op
BenchmarkSprintfString 22410548 51.51 ns/op
BenchmarkSprintfString 22887625 51.37 ns/op
BenchmarkSprintfString 23167839 51.48 ns/op
BenchmarkSprintfString 23005339 53.14 ns/op
BenchmarkSprintfString 23330318 51.38 ns/op
BenchmarkSprintfTruncateString 12694786 93.50 ns/op
BenchmarkSprintfTruncateString 12672000 94.73 ns/op
BenchmarkSprintfTruncateString 12571944 94.87 ns/op
BenchmarkSprintfTruncateString 12553992 93.89 ns/op
BenchmarkSprintfTruncateString 12824691 93.24 ns/op
BenchmarkSprintfTruncateBytes 12973922 90.91 ns/op
BenchmarkSprintfTruncateBytes 12731673 91.72 ns/op
BenchmarkSprintfTruncateBytes 13102393 91.93 ns/op
BenchmarkSprintfTruncateBytes 13002574 91.23 ns/op
BenchmarkSprintfTruncateBytes 12866536 94.21 ns/op
BenchmarkSprintfSlowParsingPath 18423003 63.99 ns/op
BenchmarkSprintfSlowParsingPath 19344086 61.89 ns/op
BenchmarkSprintfSlowParsingPath 19532617 61.73 ns/op
BenchmarkSprintfSlowParsingPath 19358544 61.76 ns/op
BenchmarkSprintfSlowParsingPath 19506118 62.74 ns/op
BenchmarkSprintfQuoteString 3341293 355.9 ns/op
BenchmarkSprintfQuoteString 3339758 357.3 ns/op
BenchmarkSprintfQuoteString 3328713 359.2 ns/op
BenchmarkSprintfQuoteString 3391056 354.6 ns/op
BenchmarkSprintfQuoteString 3352530 359.6 ns/op
BenchmarkSprintfInt 28525412 42.58 ns/op
BenchmarkSprintfInt 28024692 42.45 ns/op
BenchmarkSprintfInt 28703838 42.03 ns/op
BenchmarkSprintfInt 27698912 42.26 ns/op
BenchmarkSprintfInt 28606462 42.32 ns/op
BenchmarkSprintfIntInt 14473147 82.86 ns/op
BenchmarkSprintfIntInt 14412001 83.80 ns/op
BenchmarkSprintfIntInt 14385514 82.71 ns/op
BenchmarkSprintfIntInt 14123486 83.60 ns/op
BenchmarkSprintfIntInt 14265571 82.92 ns/op
BenchmarkSprintfPrefixedInt 10133119 117.2 ns/op
BenchmarkSprintfPrefixedInt 10236465 117.5 ns/op
BenchmarkSprintfPrefixedInt 10310547 119.7 ns/op
BenchmarkSprintfPrefixedInt 9931838 117.3 ns/op
BenchmarkSprintfPrefixedInt 10228160 117.5 ns/op
BenchmarkSprintfFloat 9077367 130.9 ns/op
BenchmarkSprintfFloat 9074992 133.1 ns/op
BenchmarkSprintfFloat 9047352 131.8 ns/op
BenchmarkSprintfFloat 9161078 132.9 ns/op
BenchmarkSprintfFloat 9056833 131.6 ns/op
BenchmarkSprintfComplex 2528482 483.6 ns/op
BenchmarkSprintfComplex 2560428 468.6 ns/op
BenchmarkSprintfComplex 2547819 466.7 ns/op
BenchmarkSprintfComplex 2543226 473.6 ns/op
BenchmarkSprintfComplex 2583084 470.9 ns/op
BenchmarkSprintfBoolean 23154970 52.37 ns/op
BenchmarkSprintfBoolean 23329108 52.19 ns/op
BenchmarkSprintfBoolean 23207778 52.11 ns/op
BenchmarkSprintfBoolean 23479516 51.95 ns/op
BenchmarkSprintfBoolean 22991388 52.53 ns/op
BenchmarkSprintfHexString 8128255 137.4 ns/op
BenchmarkSprintfHexString 8726293 136.7 ns/op
BenchmarkSprintfHexString 8704791 137.3 ns/op
BenchmarkSprintfHexString 8771907 145.4 ns/op
BenchmarkSprintfHexString 8726029 142.3 ns/op
BenchmarkSprintfHexBytes 6602197 185.7 ns/op
BenchmarkSprintfHexBytes 7172785 172.4 ns/op
BenchmarkSprintfHexBytes 7092730 173.4 ns/op
BenchmarkSprintfHexBytes 7017463 170.8 ns/op
BenchmarkSprintfHexBytes 6779690 169.6 ns/op
BenchmarkSprintfBytes 3666348 323.8 ns/op
BenchmarkSprintfBytes 3599656 328.7 ns/op
BenchmarkSprintfBytes 3719644 324.4 ns/op
BenchmarkSprintfBytes 3699574 326.9 ns/op
BenchmarkSprintfBytes 3703653 325.8 ns/op
BenchmarkSprintfStringer 4295731 279.5 ns/op
BenchmarkSprintfStringer 4301563 278.9 ns/op
BenchmarkSprintfStringer 4319803 281.8 ns/op
BenchmarkSprintfStringer 4250727 280.7 ns/op
BenchmarkSprintfStringer 4271817 279.8 ns/op
BenchmarkSprintfStructure 1000000 1035 ns/op
BenchmarkSprintfStructure 1000000 1039 ns/op
BenchmarkSprintfStructure 1000000 1033 ns/op
BenchmarkSprintfStructure 1000000 1039 ns/op
BenchmarkSprintfStructure 1000000 1042 ns/op
BenchmarkManyArgs 4136835 287.1 ns/op
BenchmarkManyArgs 4066875 286.6 ns/op
BenchmarkManyArgs 4203717 285.6 ns/op
BenchmarkManyArgs 4175217 284.8 ns/op
BenchmarkManyArgs 4194637 287.9 ns/op
BenchmarkFprintInt 26109998 45.44 ns/op
BenchmarkFprintInt 25790640 45.16 ns/op
BenchmarkFprintInt 26820238 45.34 ns/op
BenchmarkFprintInt 26323059 45.54 ns/op
BenchmarkFprintInt 26361127 45.12 ns/op
BenchmarkFprintfBytes 16256478 74.15 ns/op
BenchmarkFprintfBytes 16240521 74.51 ns/op
BenchmarkFprintfBytes 16568668 74.59 ns/op
BenchmarkFprintfBytes 16315306 74.05 ns/op
BenchmarkFprintfBytes 16454311 73.79 ns/op
BenchmarkFprintIntNoAlloc 26321391 45.40 ns/op
BenchmarkFprintIntNoAlloc 26937668 45.55 ns/op
BenchmarkFprintIntNoAlloc 26562280 45.94 ns/op
BenchmarkFprintIntNoAlloc 26378466 45.48 ns/op
BenchmarkFprintIntNoAlloc 26520276 45.15 ns/op
BenchmarkScanInts 5511 215946 ns/op
BenchmarkScanInts 5707 214258 ns/op
BenchmarkScanInts 5734 219668 ns/op
BenchmarkScanInts 5625 218471 ns/op
BenchmarkScanInts 5474 229710 ns/op
BenchmarkScanRecursiveInt 33 32271386 ns/op
BenchmarkScanRecursiveInt 34 32291493 ns/op
BenchmarkScanRecursiveInt 34 32055923 ns/op
BenchmarkScanRecursiveInt 34 31872613 ns/op
BenchmarkScanRecursiveInt 34 32002805 ns/op
BenchmarkScanRecursiveIntReaderWrapper 30 37105640 ns/op
BenchmarkScanRecursiveIntReaderWrapper 32 38414960 ns/op
BenchmarkScanRecursiveIntReaderWrapper 30 38121652 ns/op
BenchmarkScanRecursiveIntReaderWrapper 31 38119047 ns/op
BenchmarkScanRecursiveIntReaderWrapper 31 38334066 ns/op
PASS
ok fmt 168.813s
BenchmarkSprintfPadding 1347650 882.7 ns/op
BenchmarkSprintfPadding 1367989 882.0 ns/op
BenchmarkSprintfPadding 1365032 878.6 ns/op
BenchmarkSprintfPadding 1367054 885.3 ns/op
BenchmarkSprintfPadding 1332296 883.1 ns/op
BenchmarkSprintfEmpty 13761466 93.93 ns/op
BenchmarkSprintfEmpty 12513046 94.62 ns/op
BenchmarkSprintfEmpty 13590028 91.03 ns/op
BenchmarkSprintfEmpty 13318539 103.9 ns/op
BenchmarkSprintfEmpty 13430413 95.90 ns/op
BenchmarkSprintfString 4842618 249.2 ns/op
BenchmarkSprintfString 4862233 283.5 ns/op
BenchmarkSprintfString 4358883 248.2 ns/op
BenchmarkSprintfString 4950489 242.7 ns/op
BenchmarkSprintfString 4882014 257.7 ns/op
BenchmarkSprintfTruncateString 2925259 410.3 ns/op
BenchmarkSprintfTruncateString 2944784 410.4 ns/op
BenchmarkSprintfTruncateString 2946954 405.6 ns/op
BenchmarkSprintfTruncateString 2938294 409.9 ns/op
BenchmarkSprintfTruncateString 2943340 408.1 ns/op
BenchmarkSprintfTruncateBytes 3000000 398.5 ns/op
BenchmarkSprintfTruncateBytes 2977666 399.0 ns/op
BenchmarkSprintfTruncateBytes 2998501 399.3 ns/op
BenchmarkSprintfTruncateBytes 3005258 401.7 ns/op
BenchmarkSprintfTruncateBytes 2983588 399.8 ns/op
BenchmarkSprintfSlowParsingPath 4326313 289.8 ns/op
BenchmarkSprintfSlowParsingPath 4398529 271.4 ns/op
BenchmarkSprintfSlowParsingPath 4429678 272.7 ns/op
BenchmarkSprintfSlowParsingPath 4384356 271.2 ns/op
BenchmarkSprintfSlowParsingPath 4405284 271.1 ns/op
BenchmarkSprintfQuoteString 909099 1313 ns/op
BenchmarkSprintfQuoteString 902257 1315 ns/op
BenchmarkSprintfQuoteString 923080 1312 ns/op
BenchmarkSprintfQuoteString 895518 1307 ns/op
BenchmarkSprintfQuoteString 902257 1320 ns/op
BenchmarkSprintfInt 5917155 202.0 ns/op
BenchmarkSprintfInt 5925930 201.5 ns/op
BenchmarkSprintfInt 5949426 201.4 ns/op
BenchmarkSprintfInt 5952380 201.4 ns/op
BenchmarkSprintfInt 5859367 201.7 ns/op
BenchmarkSprintfIntInt 3143006 371.0 ns/op
BenchmarkSprintfIntInt 3227540 371.1 ns/op
BenchmarkSprintfIntInt 3224940 370.9 ns/op
BenchmarkSprintfIntInt 3223206 371.7 ns/op
BenchmarkSprintfIntInt 3233630 371.1 ns/op
BenchmarkSprintfPrefixedInt 2603601 467.0 ns/op
BenchmarkSprintfPrefixedInt 2491693 463.5 ns/op
BenchmarkSprintfPrefixedInt 2575659 462.7 ns/op
BenchmarkSprintfPrefixedInt 2604732 463.8 ns/op
BenchmarkSprintfPrefixedInt 2587879 463.9 ns/op
BenchmarkSprintfFloat 1752079 675.9 ns/op
BenchmarkSprintfFloat 1766004 675.4 ns/op
BenchmarkSprintfFloat 1788374 674.4 ns/op
BenchmarkSprintfFloat 1740644 687.5 ns/op
BenchmarkSprintfFloat 1579569 684.7 ns/op
BenchmarkSprintfComplex 727273 1670 ns/op
BenchmarkSprintfComplex 718566 1652 ns/op
BenchmarkSprintfComplex 722899 1649 ns/op
BenchmarkSprintfComplex 731701 1643 ns/op
BenchmarkSprintfComplex 736206 1661 ns/op
BenchmarkSprintfBoolean 5378749 221.7 ns/op
BenchmarkSprintfBoolean 5141380 222.9 ns/op
BenchmarkSprintfBoolean 5381163 222.8 ns/op
BenchmarkSprintfBoolean 5364327 222.6 ns/op
BenchmarkSprintfBoolean 4813477 226.3 ns/op
BenchmarkSprintfHexString 2189380 562.4 ns/op
BenchmarkSprintfHexString 1893042 541.9 ns/op
BenchmarkSprintfHexString 2217294 544.9 ns/op
BenchmarkSprintfHexString 2210350 539.9 ns/op
BenchmarkSprintfHexString 2232973 542.6 ns/op
BenchmarkSprintfHexBytes 1739886 689.8 ns/op
BenchmarkSprintfHexBytes 1715510 689.4 ns/op
BenchmarkSprintfHexBytes 1736110 695.2 ns/op
BenchmarkSprintfHexBytes 1733102 693.6 ns/op
BenchmarkSprintfHexBytes 1729854 685.2 ns/op
BenchmarkSprintfBytes 930243 1292 ns/op
BenchmarkSprintfBytes 937518 1284 ns/op
BenchmarkSprintfBytes 937500 1286 ns/op
BenchmarkSprintfBytes 923080 1294 ns/op
BenchmarkSprintfBytes 923080 1280 ns/op
BenchmarkSprintfStringer 1000000 1081 ns/op
BenchmarkSprintfStringer 1000000 1076 ns/op
BenchmarkSprintfStringer 1000000 1075 ns/op
BenchmarkSprintfStringer 1099468 1081 ns/op
BenchmarkSprintfStringer 1000000 1087 ns/op
BenchmarkSprintfStructure 256411 4777 ns/op
BenchmarkSprintfStructure 253699 4750 ns/op
BenchmarkSprintfStructure 251044 4767 ns/op
BenchmarkSprintfStructure 254236 4953 ns/op
BenchmarkSprintfStructure 259738 4791 ns/op
BenchmarkManyArgs 937518 1280 ns/op
BenchmarkManyArgs 930225 1287 ns/op
BenchmarkManyArgs 944869 1313 ns/op
BenchmarkManyArgs 875922 1660 ns/op
BenchmarkManyArgs 794706 1412 ns/op
BenchmarkFprintInt 4884002 231.0 ns/op
BenchmarkFprintInt 4874084 230.4 ns/op
BenchmarkFprintInt 5215124 232.2 ns/op
BenchmarkFprintInt 5258540 235.3 ns/op
BenchmarkFprintInt 4884002 244.4 ns/op
BenchmarkFprintfBytes 3452241 355.7 ns/op
BenchmarkFprintfBytes 2898550 354.5 ns/op
BenchmarkFprintfBytes 3341690 353.1 ns/op
BenchmarkFprintfBytes 2861228 372.7 ns/op
BenchmarkFprintfBytes 3320419 364.5 ns/op
BenchmarkFprintIntNoAlloc 4793978 242.6 ns/op
BenchmarkFprintIntNoAlloc 3877221 277.4 ns/op
BenchmarkFprintIntNoAlloc 5044140 234.5 ns/op
BenchmarkFprintIntNoAlloc 5054757 236.2 ns/op
BenchmarkFprintIntNoAlloc 4594178 256.5 ns/op
BenchmarkScanInts 1180 997882 ns/op
BenchmarkScanInts 1198 1069950 ns/op
BenchmarkScanInts 1204 1056893 ns/op
BenchmarkScanInts 1117 1090150 ns/op
BenchmarkScanInts 1153 1046747 ns/op
BenchmarkScanRecursiveInt 10 104360013 ns/op
BenchmarkScanRecursiveInt 10 112169933 ns/op
BenchmarkScanRecursiveInt 10 105859994 ns/op
BenchmarkScanRecursiveInt 10 108389965 ns/op
BenchmarkScanRecursiveInt 10 101360000 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 105970022 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 105409997 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 104600013 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 104040013 ns/op
BenchmarkScanRecursiveIntReaderWrapper 10 107020006 ns/op
PASS
http://localhost:58300/wasm_exec.js:585:10 Uncaught
Error: Go program has already exited
at global.Go._resume (http://localhost:58300/wasm_exec.js:586:11)
at http://localhost:58300/wasm_exec.js:314:14
[wasmbrowsertest]: 2021/11/07 22:03:46 main.go:158: context canceled
[wasmbrowsertest]: 2021/11/07 22:03:46 main.go:169: context canceled
ok fmt 191.060s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment