Skip to content

Instantly share code, notes, and snippets.

@davidfowl
Last active April 5, 2017 07:19
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 davidfowl/c487ad4b49f013b6e9d4fc1ccc84bbf2 to your computer and use it in GitHub Desktop.
Save davidfowl/c487ad4b49f013b6e9d4fc1ccc84bbf2 to your computer and use it in GitHub Desktop.
Kestrel Performance investigation

Parsers byte by byte TakeHeader

                              Method |           Mean |     StdErr |      StdDev | Scaled | Scaled-StdDev |          RPS |
------------------------------------ |--------------- |----------- |------------ |------- |-------------- |------------- |
                      ParsePlaintext |  1,468.1394 ns | 26.6217 ns | 145.8131 ns |   1.00 |          0.00 |   681,134.21 |
             ParsePipelinedPlaintext |  1,156.2695 ns | 10.0097 ns |  54.8253 ns |   0.79 |          0.08 |   864,850.26 |
                ParsePlaintextCopies |  1,364.7059 ns | 36.8237 ns | 201.6917 ns |   0.94 |          0.16 |   732,758.61 |
       ParsePipelinedPlaintextCopies |  1,104.2950 ns | 16.3433 ns |  89.5162 ns |   0.76 |          0.09 |   905,555.16 |
          ParsePlaintextSingleOrMany |  1,312.0126 ns | 12.6481 ns |  69.2764 ns |   0.90 |          0.09 |   762,187.78 |
 ParsePipelinedPlaintextSingleOrMany |    968.4494 ns |  6.1786 ns |  33.8415 ns |   0.67 |          0.06 | 1,032,578.45 |

Parsers TakeHeaderIndexOf

                              Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |
------------------------------------ |----------- |---------- |---------- |------- |-------------- |----------- |
                      ParsePlaintext |  1.5053 us | 0.0292 us | 0.1602 us |   1.00 |          0.00 | 664,328.32 |
             ParsePipelinedPlaintext |  1.1502 us | 0.0184 us | 0.1007 us |   0.77 |          0.10 | 869,443.03 |
                ParsePlaintextCopies |  1.2239 us | 0.0161 us | 0.0881 us |   0.82 |          0.10 | 817,063.22 |
       ParsePipelinedPlaintextCopies |  1.1068 us | 0.0176 us | 0.0962 us |   0.74 |          0.09 | 903,502.59 |
          ParsePlaintextSingleOrMany |  1.3119 us | 0.0223 us | 0.1221 us |   0.88 |          0.11 | 762,250.21 |
 ParsePipelinedPlaintextSingleOrMany |  1.0748 us | 0.0209 us | 0.1143 us |   0.72 |          0.10 | 930,395.83 |

Parsers TakeHeaderIndexOfVectorized

                              Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |
------------------------------------ |----------- |---------- |---------- |------- |-------------- |----------- |
                      ParsePlaintext |  1.5316 us | 0.0379 us | 0.2074 us |   1.00 |          0.00 | 652,923.60 |
             ParsePipelinedPlaintext |  1.3347 us | 0.0268 us | 0.1465 us |   0.88 |          0.13 | 749,242.32 |
                ParsePlaintextCopies |  1.2279 us | 0.0147 us | 0.0808 us |   0.81 |          0.10 | 814,416.90 |
       ParsePipelinedPlaintextCopies |  1.1805 us | 0.0331 us | 0.1813 us |   0.78 |          0.14 | 847,068.18 |
          ParsePlaintextSingleOrMany |  1.2813 us | 0.0075 us | 0.0411 us |   0.85 |          0.09 | 780,429.62 |
 ParsePipelinedPlaintextSingleOrMany |  1.1051 us | 0.0153 us | 0.0838 us |   0.73 |          0.09 | 904,912.53 |

Experiemnts

                                     Method |           Mean |        StdErr |         StdDev |         Median | Scaled | Scaled-StdDev |          RPS |
------------------------------------------ |--------------- |-------------- |--------------- |--------------- |------- |-------------- |------------- |
                            ParsePlaintext |  1,404.9968 ns |    12.5735 ns |     68.8681 ns |  1,382.2802 ns |   1.00 |          0.00 |   711,745.40 |
                   ParsePipelinedPlaintext |  1,210.2935 ns |    13.9675 ns |     76.5031 ns |  1,201.1716 ns |   0.86 |          0.07 |   826,245.87 |
                      ParsePlaintextCopies |  1,271.5505 ns |    10.6170 ns |     58.1518 ns |  1,259.8374 ns |   0.91 |          0.06 |   786,441.46 |
             ParsePipelinedPlaintextCopies |  1,076.0414 ns |     8.5012 ns |     46.5631 ns |  1,070.6585 ns |   0.77 |          0.05 |   929,332.26 |
                ParsePlaintextSingleOrMany |  1,447.2420 ns |    55.3273 ns |    303.0403 ns |  1,335.0013 ns |   1.03 |          0.22 |   690,969.44 |
       ParsePipelinedPlaintextSingleOrMany |  1,151.2098 ns |    24.9513 ns |    136.6636 ns |  1,100.3522 ns |   0.82 |          0.10 |   868,651.39 |
             ParsePlaintextEnumerateMemory |  1,322.6053 ns |    31.6944 ns |    173.5974 ns |  1,238.6401 ns |   0.94 |          0.13 |   756,083.45 |
    ParsePipelinedPlaintextEnumerateMemory | 38,994.1069 ns | 2,781.4541 ns | 15,234.6514 ns | 35,977.7565 ns |  27.82 |         10.77 |    25,644.90 |
               ParsePlaintextCopiesPointer |  1,147.9647 ns |     9.5051 ns |     52.0617 ns |  1,126.6204 ns |   0.82 |          0.05 |   871,106.94 |
      ParsePipelinedPlaintextCopiesPointer |    938.7816 ns |     7.6658 ns |     41.9872 ns |    925.2468 ns |   0.67 |          0.04 | 1,065,210.51 |
          ParsePlaintextCopiesTryIndicesOf |  1,177.4041 ns |     7.5886 ns |     41.5645 ns |  1,164.6992 ns |   0.84 |          0.05 |   849,326.08 |
 ParsePipelinedPlaintextCopiesTryIndicesOf |             NA |            NA |             NA |             NA |      ? |             ? |          N/A |

Dev

                   Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |
------------------------- |----------- |---------- |------- |-------------- |----------- |
           ParsePlaintext |  1.9746 us | 0.1077 us |   1.00 |          0.00 | 506,425.99 |
  ParsePipelinedPlaintext |  1.5634 us | 0.0461 us |   0.79 |          0.04 | 639,627.04 |
          ParseLiveAspNet |  6.9810 us | 0.3158 us |   3.54 |          0.23 | 143,245.89 |
 ParsePipelinedLiveAspNet |  7.3884 us | 0.2028 us |   3.75 |          0.21 | 135,347.64 |
             ParseUnicode | 13.6600 us | 0.4350 us |   6.94 |          0.40 |  73,206.52 |
    ParseUnicodePipelined | 14.3855 us | 0.3619 us |   7.30 |          0.40 |  69,514.63 |

single span fast path

                   Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |
------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |
           ParsePlaintext |  1.7333 us | 0.0170 us | 0.0930 us |   1.00 |          0.00 | 576,944.45 |
  ParsePipelinedPlaintext |  1.3777 us | 0.0054 us | 0.0297 us |   0.80 |          0.04 | 725,860.68 |
          ParseLiveAspNet |  6.2624 us | 0.0919 us | 0.5034 us |   3.62 |          0.33 | 159,684.30 |
 ParsePipelinedLiveAspNet |  7.1241 us | 0.0206 us | 0.1129 us |   4.12 |          0.21 | 140,367.74 |
             ParseUnicode | 12.2867 us | 0.0771 us | 0.4225 us |   7.11 |          0.41 |  81,388.97 |
    ParseUnicodePipelined | 14.4833 us | 0.0500 us | 0.2740 us |   8.38 |          0.43 |  69,045.27 |

dev(0)

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.5612 us | 0.1100 us |   1.00 |          0.00 | 390,444.02 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.5675 us | 0.1377 us |   1.00 |          0.07 | 389,482.08 |      - |     350 B |
|                    ParseLiveAspNet |  5.8670 us | 0.2173 us |   2.29 |          0.12 | 170,446.05 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  7.6898 us | 0.2521 us |   3.01 |          0.15 | 130,043.10 |      - |   1.12 kB |
|                       ParseUnicode | 12.0586 us | 0.2649 us |   4.72 |          0.21 |  82,928.63 |      - |   1.97 kB |
|              ParseUnicodePipelined | 14.9777 us | 0.4314 us |   5.86 |          0.29 |  66,765.73 | 0.0053 |   1.97 kB |

dev(1)

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.6188 us | 0.1291 us |   1.00 |          0.00 | 381,859.44 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.5708 us | 0.1280 us |   0.98 |          0.07 | 388,981.20 |      - |     350 B |
|                    ParseLiveAspNet |  5.9197 us | 0.2650 us |   2.27 |          0.14 | 168,928.34 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  7.7182 us | 0.2114 us |   2.95 |          0.16 | 129,564.40 |      - |   1.12 kB |
|                       ParseUnicode | 12.1486 us | 0.3453 us |   4.65 |          0.25 |  82,314.28 |      - |   1.97 kB |
|              ParseUnicodePipelined | 15.1189 us | 0.4569 us |   5.79 |          0.32 |  66,142.25 | 0.0099 |   1.97 kB |

dev(2)

|                             Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.6021 us | 0.0329 us | 0.1801 us |   1.00 |          0.00 | 384,298.53 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.5254 us | 0.0120 us | 0.0655 us |   0.97 |          0.06 | 395,970.94 |      - |     350 B |
|                    ParseLiveAspNet |  5.9584 us | 0.0682 us | 0.3733 us |   2.30 |          0.20 | 167,831.58 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  7.6718 us | 0.0474 us | 0.2595 us |   2.96 |          0.21 | 130,347.94 |      - |   1.12 kB |
|                       ParseUnicode | 12.5011 us | 0.1411 us | 0.7728 us |   4.82 |          0.42 |  79,992.76 |      - |   1.97 kB |
|              ParseUnicodePipelined | 15.1260 us | 0.0683 us | 0.3741 us |   5.84 |          0.38 |  66,111.18 | 0.0130 |   1.97 kB |

davidfowl/fix-benchmark-write-size

|                             Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.5202 us | 0.0184 us | 0.1008 us |   1.00 |          0.00 | 396,795.79 |      - |     353 B |
| ParsePipelinedPlaintextTechEmpower |  2.2463 us | 0.0272 us | 0.1490 us |   0.89 |          0.07 | 445,173.68 |      - |     351 B |
|                    ParseLiveAspNet |  5.8682 us | 0.0551 us | 0.3016 us |   2.33 |          0.15 | 170,411.04 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  7.0612 us | 0.0399 us | 0.2185 us |   2.81 |          0.14 | 141,619.97 |      - |   1.11 kB |
|                       ParseUnicode | 12.0488 us | 0.1141 us | 0.6247 us |   4.79 |          0.30 |  82,995.97 |      - |   1.99 kB |
|              ParseUnicodePipelined | 15.5712 us | 0.1022 us | 0.5596 us |   6.19 |          0.32 |  64,221.06 | 0.0076 |   1.98 kB |

davidfowl/new-reader(0)

|                             Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.7719 us | 0.0183 us | 0.1003 us |   1.00 |          0.00 | 360,763.92 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.4600 us | 0.0192 us | 0.1051 us |   0.89 |          0.05 | 406,511.89 |      - |     350 B |
|                    ParseLiveAspNet |  6.3680 us | 0.0893 us | 0.4890 us |   2.30 |          0.19 | 157,035.09 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  6.1483 us | 0.0415 us | 0.2274 us |   2.22 |          0.11 | 162,645.70 |      - |   1.12 kB |
|                       ParseUnicode | 12.5587 us | 0.0627 us | 0.3436 us |   4.54 |          0.20 |  79,626.36 |      - |   1.97 kB |
|              ParseUnicodePipelined | 13.1148 us | 0.0955 us | 0.5229 us |   4.74 |          0.25 |  76,249.67 | 0.0114 |   1.97 kB |

davidfowl/new-reader(1)

                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
          ParsePlaintextTechEmpower |  2.7913 us | 0.1131 us |   1.00 |          0.00 | 358,254.55 |      - |     350 B |
 ParsePipelinedPlaintextTechEmpower |  2.4623 us | 0.0886 us |   0.88 |          0.05 | 406,130.51 |      - |     350 B |
                    ParseLiveAspNet |  6.0162 us | 0.1552 us |   2.16 |          0.10 | 166,217.95 |      - |   1.12 kB |
           ParsePipelinedLiveAspNet |  5.9721 us | 0.1868 us |   2.14 |          0.11 | 167,445.37 |      - |   1.12 kB |
                       ParseUnicode | 12.2541 us | 0.5152 us |   4.40 |          0.25 |  81,605.53 |      - |   1.97 kB |
              ParseUnicodePipelined | 12.4281 us | 0.4483 us |   4.46 |          0.24 |  80,462.86 | 0.0153 |   1.97 kB |

davidfowl/new-reader(2)

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.6882 us | 0.0776 us |   1.00 |          0.00 | 371,999.97 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.3695 us | 0.1029 us |   0.88 |          0.04 | 422,028.95 |      - |     350 B |
|                    ParseLiveAspNet |  6.2520 us | 0.2694 us |   2.33 |          0.12 | 159,948.12 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.9049 us | 0.2367 us |   2.20 |          0.11 | 169,351.77 |      - |   1.12 kB |
|                       ParseUnicode | 12.2444 us | 0.5630 us |   4.56 |          0.24 |  81,669.75 |      - |   1.97 kB |
|              ParseUnicodePipelined | 12.4451 us | 0.3218 us |   4.63 |          0.17 |  80,353.04 | 0.0015 |   1.97 kB |

davidfowl/new-reader(3)

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.5903 us | 0.0643 us |   1.00 |          0.00 | 386,049.47 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.3856 us | 0.0909 us |   0.92 |          0.04 | 419,175.07 |      - |     350 B |
|                    ParseLiveAspNet |  5.9754 us | 0.1518 us |   2.31 |          0.08 | 167,352.43 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.7275 us | 0.2394 us |   2.21 |          0.11 | 174,597.37 |      - |   1.12 kB |
|                       ParseUnicode | 12.2032 us | 0.3343 us |   4.71 |          0.17 |  81,945.73 |      - |   1.97 kB |
|              ParseUnicodePipelined | 12.1986 us | 0.3692 us |   4.71 |          0.18 |  81,976.80 | 0.0061 |   1.97 kB |

davidfowl/single-header-perf

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.7511 us | 0.0949 us |   1.00 |          0.00 | 363,486.52 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.3636 us | 0.0690 us |   0.86 |          0.04 | 423,074.64 |      - |     350 B |
|                    ParseLiveAspNet |  6.2400 us | 0.2195 us |   2.27 |          0.11 | 160,255.61 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.6932 us | 0.1827 us |   2.07 |          0.09 | 175,647.88 |      - |   1.12 kB |
|                       ParseUnicode | 11.9390 us | 0.3746 us |   4.34 |          0.20 |  83,759.23 |      - |   1.97 kB |
|              ParseUnicodePipelined | 12.3980 us | 0.3138 us |   4.51 |          0.19 |  80,657.98 | 0.0122 |   1.97 kB |

davidfowl/single-header-perf(1)

|                             Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.5987 us | 0.0272 us | 0.1491 us |   1.00 |          0.00 | 384,803.34 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.2639 us | 0.0168 us | 0.0920 us |   0.87 |          0.06 | 441,714.14 |      - |     350 B |
|                    ParseLiveAspNet |  5.4026 us | 0.0394 us | 0.2159 us |   2.09 |          0.14 | 185,096.43 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.3229 us | 0.0335 us | 0.1837 us |   2.05 |          0.13 | 187,867.78 |      - |   1.12 kB |
|                       ParseUnicode | 11.9579 us | 0.1204 us | 0.6596 us |   4.62 |          0.35 |  83,626.80 |      - |   1.97 kB |
|              ParseUnicodePipelined | 11.5232 us | 0.0770 us | 0.4216 us |   4.45 |          0.29 |  86,781.58 | 0.0092 |   1.97 kB |

davidfowl/single-header-perf(2)

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.5369 us | 0.1115 us |   1.00 |          0.00 | 394,189.07 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.1979 us | 0.0822 us |   0.87 |          0.05 | 454,978.91 |      - |     350 B |
|                    ParseLiveAspNet |  5.6132 us | 0.2524 us |   2.22 |          0.13 | 178,151.24 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.4650 us | 0.2083 us |   2.16 |          0.12 | 182,982.87 |      - |   1.12 kB |
|                       ParseUnicode | 11.5887 us | 0.3589 us |   4.58 |          0.24 |  86,290.64 |      - |   1.97 kB |
|              ParseUnicodePipelined | 11.4880 us | 0.4620 us |   4.54 |          0.26 |  87,046.99 | 0.0099 |   1.97 kB |

davidfowl/single-header-perf(3)

|                             Method |       Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.5666 us | 0.1205 us |   1.00 |          0.00 | 389,615.12 |      - |     350 B |
| ParsePipelinedPlaintextTechEmpower |  2.2553 us | 0.0782 us |   0.88 |          0.05 | 443,392.76 |      - |     350 B |
|                    ParseLiveAspNet |  5.8072 us | 0.2892 us |   2.27 |          0.15 | 172,200.78 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.4284 us | 0.2896 us |   2.12 |          0.14 | 184,215.13 |      - |   1.12 kB |
|                       ParseUnicode | 11.4572 us | 0.3329 us |   4.47 |          0.23 |  87,281.51 |      - |   1.97 kB |
|              ParseUnicodePipelined | 11.6016 us | 0.3935 us |   4.53 |          0.25 |  86,195.10 | 0.0023 |   1.97 kB |

davidfowl/single-header-perf(3.1) (with fixed benchmark writes)

|                             Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|----------------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
|          ParsePlaintextTechEmpower |  2.4472 us | 0.0206 us | 0.1131 us |   1.00 |          0.00 | 408,625.73 |      - |     353 B |
| ParsePipelinedPlaintextTechEmpower |  2.1090 us | 0.0213 us | 0.1167 us |   0.86 |          0.06 | 474,157.70 |      - |     351 B |
|                    ParseLiveAspNet |  5.6308 us | 0.0565 us | 0.3097 us |   2.31 |          0.16 | 177,594.84 |      - |   1.12 kB |
|           ParsePipelinedLiveAspNet |  5.1872 us | 0.0364 us | 0.1993 us |   2.12 |          0.12 | 192,783.52 |      - |   1.11 kB |
|                       ParseUnicode | 12.0182 us | 0.1382 us | 0.7571 us |   4.92 |          0.37 |  83,207.09 |      - |   1.99 kB |
|              ParseUnicodePipelined | 11.7135 us | 0.0551 us | 0.3020 us |   4.80 |          0.24 |  85,371.64 | 0.0061 |   1.98 kB |

feature/dev-si

|                             Method |      Mean |    StdDev | Scaled | Scaled-StdDev |        RPS | Allocated |
|----------------------------------- |---------- |---------- |------- |-------------- |----------- |---------- |
|          ParsePlaintextTechEmpower | 2.0434 us | 0.1045 us |   1.00 |          0.00 | 489,385.45 |     355 B |
| ParsePipelinedPlaintextTechEmpower | 1.7165 us | 0.0567 us |   0.84 |          0.05 | 582,591.73 |     344 B |
|                    ParseLiveAspNet | 5.2263 us | 0.1465 us |   2.56 |          0.13 | 191,339.98 |   1.11 kB |
|           ParsePipelinedLiveAspNet | 4.9461 us | 0.1667 us |   2.43 |          0.13 | 202,178.31 |    1.1 kB |
|                       ParseUnicode | 8.0901 us | 0.3557 us |   3.97 |          0.25 | 123,607.67 |   1.94 kB |
|              ParseUnicodePipelined | 8.1588 us | 0.3502 us |   4.00 |          0.25 | 122,567.09 |   1.93 kB |

dev

|                        Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS | Allocated |
|------------------------------ |----------- |---------- |---------- |------- |-------------- |----------- |---------- |
|          PlaintextTechEmpower |  2.3128 us | 0.0175 us | 0.0959 us |   1.00 |          0.00 | 432,373.26 |     353 B |
| PipelinedPlaintextTechEmpower |  1.9334 us | 0.0102 us | 0.0560 us |   0.84 |          0.04 | 517,233.16 |     351 B |
|                    LiveAspNet |  4.8697 us | 0.0533 us | 0.2919 us |   2.11 |          0.15 | 205,350.36 |   1.12 kB |
|           PipelinedLiveAspNet |  4.3800 us | 0.0328 us | 0.1796 us |   1.90 |          0.11 | 228,312.12 |   1.11 kB |
|                       Unicode | 10.0551 us | 0.0494 us | 0.2704 us |   4.35 |          0.21 |  99,451.68 |   1.99 kB |
|              UnicodePipelined |  9.9063 us | 0.0428 us | 0.2343 us |   4.29 |          0.20 | 100,946.25 |   1.98 kB |

davidfowl/fix-copyto

|                        Method |      Mean |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
|------------------------------ |---------- |---------- |------- |-------------- |----------- |------- |---------- |
|          PlaintextTechEmpower | 2.1536 us | 0.1049 us |   1.00 |          0.00 | 464,347.48 |      - |     353 B |
| PipelinedPlaintextTechEmpower | 1.7853 us | 0.0900 us |   0.83 |          0.06 | 560,137.96 |      - |     351 B |
|                    LiveAspNet | 4.2399 us | 0.1141 us |   1.97 |          0.10 | 235,851.93 |      - |   1.12 kB |
|           PipelinedLiveAspNet | 3.9945 us | 0.1486 us |   1.86 |          0.11 | 250,345.19 |      - |   1.11 kB |
|                       Unicode | 9.5864 us | 0.3443 us |   4.46 |          0.26 | 104,314.44 |      - |   1.99 kB |
|              UnicodePipelined | 9.4963 us | 0.3838 us |   4.42 |          0.27 | 105,304.15 | 0.0031 |   1.98 kB |

Single request call counts

GET  HTTP/1.1
Host: localhost:5000
Cache-Control: no-cache
Postman-Token: bb3bb74e-8bb4-ef6d-fbb6-61b8440d20df

original pipelines (824ef2c9375538a0980c435e661ed04d0fea8916)

TakeStartLine

image

TakeMessageHeaders

image

davidfowl/less-index-of

TakeStartLine

image

TakeMessageHeaders

image

davidfowl/pointers

TakeStartLine

image

TakeMessageHeaders

image

BenchmarkDotNet=v0.10.2.346, OS=Windows
Processor=?, ProcessorCount=2
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
dotnet cli version=1.0.0-rc4-004847
  [Host]     : .NET Core 4.6.25009.03, 64bit RyuJIT
  Job-NLZZMR : .NET Core 4.6.25009.03, 64bit RyuJIT

RemoveOutliers=False  Runtime=Core  Server=True
LaunchCount=3  RunStrategy=Throughput  TargetCount=10
WarmupCount=5

feature/dev-si

Method |          Mean |      StdErr |        StdDev | Scaled | Scaled-StdDev |          RPS |  Gen 0 | Allocated |
------------------------- |-------------- |------------ |-------------- |------- |-------------- |------------- |------- |---------- |
           ParsePlaintext | 1,388.2713 ns |  62.7089 ns |   343.4705 ns |   1.00 |          0.00 |   720,320.28 |      - |     116 B |
  ParsePipelinedPlaintext |   800.7270 ns |  13.0114 ns |    71.2661 ns |   0.60 |          0.12 | 1,248,865.11 |      - |     104 B |
          ParseLiveAspNet | 6,248.7377 ns | 625.8810 ns | 3,428.0915 ns |   4.70 |          2.71 |   160,032.32 |      - |   1.11 kB |
 ParsePipelinedLiveAspNet | 5,292.3607 ns | 189.9239 ns | 1,040.2562 ns |   3.98 |          1.06 |   188,951.60 |      - |    1.1 kB |
             ParseUnicode | 7,541.8873 ns | 274.3478 ns | 1,502.6649 ns |   5.67 |          1.53 |   132,592.81 |      - |   1.94 kB |
    ParseUnicodePipelined | 7,618.2226 ns | 282.2195 ns | 1,545.7799 ns |   5.73 |          1.56 |   131,264.21 | 0.0542 |   1.93 kB |

824ef2c9375538a0980c435e661ed04d0fea8916

                   Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
           ParsePlaintext |  2.9385 us | 0.1298 us | 0.7110 us |   1.00 |          0.00 | 340,313.21 |      - |     105 B |
  ParsePipelinedPlaintext |  3.1681 us | 0.1238 us | 0.6779 us |   1.11 |          0.28 | 315,646.91 |      - |     105 B |
          ParseLiveAspNet | 17.9308 us | 0.7491 us | 4.1029 us |   6.31 |          1.68 |  55,769.98 |      - |    1.1 kB |
 ParsePipelinedLiveAspNet | 15.3741 us | 0.2586 us | 1.4166 us |   5.41 |          0.90 |  65,044.66 |      - |    1.1 kB |
             ParseUnicode | 20.4670 us | 0.8955 us | 4.9051 us |   7.20 |          1.98 |  48,859.21 |      - |   1.94 kB |
    ParseUnicodePipelined | 28.3538 us | 0.6693 us | 3.6658 us |   9.97 |          1.88 |  35,268.61 | 0.0504 |   1.94 kB |

davidfowl/changes (stale)

                   Method |       Mean |    StdErr |    StdDev |     Median | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
------------------------- |----------- |---------- |---------- |----------- |------- |-------------- |----------- |------- |---------- |
           ParsePlaintext |  1.7955 us | 0.0134 us | 0.0731 us |  1.7782 us |   1.00 |          0.00 | 556,957.45 |      - |     169 B |
  ParsePipelinedPlaintext |  1.6104 us | 0.0489 us | 0.2676 us |  1.5306 us |   0.90 |          0.15 | 620,959.36 |      - |     169 B |
          ParseLiveAspNet |  6.7638 us | 0.1885 us | 1.0327 us |  6.3459 us |   3.77 |          0.58 | 147,845.28 |      - |   2.02 kB |
 ParsePipelinedLiveAspNet |  6.4734 us | 0.2466 us | 1.3505 us |  5.8914 us |   3.61 |          0.75 | 154,479.05 | 0.0641 |   2.02 kB |
             ParseUnicode | 12.0853 us | 0.4657 us | 2.5507 us | 11.0432 us |   6.74 |          1.42 |  82,745.28 |      - |   3.41 kB |
    ParseUnicodePipelined | 11.7133 us | 0.1754 us | 0.9608 us | 11.2543 us |   6.53 |          0.58 |  85,373.00 | 0.1938 |   3.41 kB |

davidfowl/less-index-of (obsolete)

                   Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
           ParsePlaintext |  2.2920 us | 0.1702 us | 0.9320 us |   1.00 |          0.00 | 436,300.18 |      - |     105 B |
  ParsePipelinedPlaintext |  1.6393 us | 0.0469 us | 0.2569 us |   0.77 |          0.20 | 610,028.10 |      - |     105 B |
          ParseLiveAspNet |  8.2912 us | 0.1514 us | 0.8292 us |   3.89 |          0.87 | 120,610.03 |      - |    1.1 kB |
 ParsePipelinedLiveAspNet |  8.1715 us | 0.0959 us | 0.5254 us |   3.84 |          0.80 | 122,376.09 |      - |    1.1 kB |
             ParseUnicode | 19.9501 us | 1.0288 us | 5.6351 us |   9.37 |          3.24 |  50,125.02 |      - |   1.94 kB |
    ParseUnicodePipelined | 18.7928 us | 0.6948 us | 3.8054 us |   8.83 |          2.51 |  53,211.80 | 0.0450 |   1.94 kB |

davidfowl/pointers state machine for headers only

                   Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |  Gen 0 | Allocated |
------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |------- |---------- |
           ParsePlaintext |  1.5800 us | 0.0127 us | 0.0694 us |   1.00 |          0.00 | 632,906.57 |      - |     105 B |
  ParsePipelinedPlaintext |  1.3839 us | 0.0177 us | 0.0971 us |   0.88 |          0.07 | 722,610.17 |      - |     105 B |
          ParseLiveAspNet |  6.9462 us | 0.0496 us | 0.2715 us |   4.40 |          0.24 | 143,963.48 |      - |    1.1 kB |
 ParsePipelinedLiveAspNet |  6.9252 us | 0.0367 us | 0.2010 us |   4.39 |          0.21 | 144,400.07 |      - |    1.1 kB |
             ParseUnicode | 10.8799 us | 0.0485 us | 0.2654 us |   6.90 |          0.31 |  91,912.70 |      - |   1.94 kB |
    ParseUnicodePipelined | 10.8887 us | 0.0487 us | 0.2668 us |   6.90 |          0.31 |  91,838.49 | 0.0710 |   1.94 k

davidfowl/pointers with state machine for start line and each header

                   Method |       Mean |    StdErr |    StdDev | Scaled | Scaled-StdDev |        RPS |
------------------------- |----------- |---------- |---------- |------- |-------------- |----------- |
           ParsePlaintext |  1.4603 us | 0.0097 us | 0.0532 us |   1.00 |          0.00 | 684,774.97 |
  ParsePipelinedPlaintext |  1.2005 us | 0.0065 us | 0.0356 us |   0.82 |          0.04 | 833,020.72 |
          ParseLiveAspNet |  6.2850 us | 0.1520 us | 0.8327 us |   4.31 |          0.58 | 159,109.00 |
 ParsePipelinedLiveAspNet |  6.1621 us | 0.0528 us | 0.2895 us |   4.22 |          0.24 | 162,283.54 |
             ParseUnicode | 10.6553 us | 0.0403 us | 0.2210 us |   7.31 |          0.29 |  93,850.31 |
    ParseUnicodePipelined | 11.2406 us | 0.0735 us | 0.4027 us |   7.71 |          0.38 |  88,963.46 |

SocketInput (baseline)

                   Method |          Mean |      StdErr |      StdDev |        Median | Scaled | Scaled-StdDev |          RPS |
------------------------- |-------------- |------------ |------------ |-------------- |------- |-------------- |------------- |
           ParsePlaintext | 1,255.5636 ns |   8.5508 ns |  46.8348 ns | 1,245.5658 ns |   1.00 |          0.00 |   796,455.05 |
  ParsePipelinedPlaintext |   937.1283 ns |   3.8344 ns |  21.0016 ns |   936.3662 ns |   0.75 |          0.03 | 1,067,089.72 |
          ParseLiveAspNet | 5,099.7575 ns |  31.0064 ns | 169.8291 ns | 5,076.4805 ns |   4.07 |          0.20 |   196,087.75 |
 ParsePipelinedLiveAspNet | 4,866.9577 ns |  27.0471 ns | 148.1432 ns | 4,860.5233 ns |   3.88 |          0.18 |   205,467.17 |
             ParseUnicode | 8,194.6155 ns |  77.5021 ns | 424.4966 ns | 8,090.0186 ns |   6.54 |          0.40 |   122,031.35 |
    ParseUnicodePipelined | 8,622.9551 ns | 130.1916 ns | 713.0889 ns | 8,285.4235 ns |   6.88 |          0.61 |   115,969.52 |

SocketInput (show-me-the-perf)

                   Method |           Mean |     StdErr |      StdDev | Scaled | Scaled-StdDev |          RPS |
------------------------- |--------------- |----------- |------------ |------- |-------------- |------------- |
           ParsePlaintext |  1,192.2795 ns |  6.7577 ns |  37.0135 ns |   1.00 |          0.00 |   838,729.49 |
  ParsePipelinedPlaintext |    946.8481 ns |  7.8544 ns |  43.0203 ns |   0.79 |          0.04 | 1,056,135.56 |
          ParseLiveAspNet |  6,146.7503 ns | 66.7514 ns | 365.6127 ns |   5.16 |          0.34 |   162,687.59 |
 ParsePipelinedLiveAspNet |  5,873.7186 ns | 31.3745 ns | 171.8453 ns |   4.93 |          0.20 |   170,249.90 |
             ParseUnicode | 10,264.0688 ns | 38.0013 ns | 208.1416 ns |   8.62 |          0.31 |    97,427.25 |
    ParseUnicodePipelined | 10,919.9642 ns | 68.4031 ns | 374.6591 ns |   9.17 |          0.41 |    91,575.39 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment