Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Speed up WritableBuffer.WriteXxx #1504

Merged
merged 6 commits into from
Mar 18, 2017
Merged

Conversation

benaadams
Copy link
Contributor

@benaadams benaadams commented Mar 18, 2017

dev

 Method |                       Type |      Mean |    StdDev |       Op/s | Allocated |
------- |--------------------------- |---------- |---------- |----------- |---------- |
 Output |                 LiveAspNet | 3.8515 us | 0.0253 us | 259,636.96 |     664 B |
 Output |           PlaintextChunked | 1.4079 us | 0.0277 us | 710,277.44 |     232 B |
 Output | PlaintextChunkedWithCookie | 2.9045 us | 0.0464 us | 344,288.21 |     814 B |
 Output |        PlaintextWithCookie | 3.4845 us | 0.0525 us | 286,983.30 |     900 B |
 Output |       TechEmpowerPlaintext | 1.8344 us | 0.0136 us | 545,149.42 |     317 B |

PR

 Method |                       Type |      Mean |    StdDev |       Op/s | Allocated |
------- |--------------------------- |---------- |---------- |----------- |---------- |
 Output |                 LiveAspNet | 3.0829 us | 0.0762 us | 324,367.00 |     353 B |
 Output |           PlaintextChunked | 1.2563 us | 0.0075 us | 795,959.04 |     192 B |
 Output | PlaintextChunkedWithCookie | 1.9574 us | 0.0136 us | 510,893.40 |     487 B |
 Output |        PlaintextWithCookie | 2.6213 us | 0.0294 us | 381,491.96 |     573 B |
 Output |       TechEmpowerPlaintext | 1.7388 us | 0.0293 us | 575,102.39 |     277 B |

/cc @davidfowl

@benaadams
Copy link
Contributor Author

Added benchmarks

@benaadams
Copy link
Contributor Author

benaadams commented Mar 18, 2017

feature-si for reference - still long way to go

 Method |                       Type |          Mean |     StdDev |          RPS | Allocated |
------- |--------------------------- |-------------- |----------- |------------- |---------- |
 Output |                 LiveAspNet | 1,384.3867 ns | 21.0264 ns |   722,341.54 |      64 B |
 Output |           PlaintextChunked |   570.4469 ns |  8.7973 ns | 1,753,011.45 |      64 B |
 Output | PlaintextChunkedWithCookie |   927.3479 ns | 10.3280 ns | 1,078,343.95 |      64 B |
 Output |        PlaintextWithCookie |   953.3636 ns | 12.3276 ns | 1,048,917.75 |      64 B |
 Output |       TechEmpowerPlaintext |   581.0874 ns |  7.2057 ns | 1,720,911.39 |      64 B |

@benaadams
Copy link
Contributor Author

@davidfowl Benchmark isn't returning blocks, when/how is that supposed to happen (i.e. what hook do I need to add)

@benaadams benaadams changed the title Speed up WritableBuffer.WriteAscii Speed up WritableBuffer.WriteXxx Mar 18, 2017
@benaadams
Copy link
Contributor Author

PR

 Method |                       Type |      Mean |    StdDev |      Op/s | Allocated |
------- |--------------------------- |---------- |---------- |---------- |---------- |
 Output |                 LiveAspNet | 2.8919 us | 0.0866 us | 345797.29 |     353 B |
 Output |           PlaintextChunked | 1.2609 us | 0.0103 us | 793106.22 |     192 B |
 Output | PlaintextChunkedWithCookie | 1.9944 us | 0.0231 us | 501415.48 |     487 B |
 Output |        PlaintextWithCookie | 2.2267 us | 0.0186 us | 449097.08 |     509 B |
 Output |       TechEmpowerPlaintext | 1.3983 us | 0.0168 us | 715156.59 |     214 B |

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants