Commit 6d28a93
committed
core: simplify timeout header processing
Changes slightly improve performance
Benchmark (serialized) Mode Cnt Score Error Units
GrpcUtilBenchmark.encodeNew 1000n sample 336623 51.718 ± 1.417 ns/op
GrpcUtilBenchmark.encodeNew 1000u sample 236574 77.555 ± 20.875 ns/op
GrpcUtilBenchmark.encodeNew 1000m sample 224392 71.155 ± 1.600 ns/op
GrpcUtilBenchmark.encodeNew 1000S sample 229616 67.269 ± 2.037 ns/op
GrpcUtilBenchmark.encodeNew 1000M sample 215301 70.282 ± 1.933 ns/op
GrpcUtilBenchmark.encodeNew 1000H sample 225063 73.679 ± 20.430 ns/op
GrpcUtilBenchmark.encodeOld 1000n sample 311832 85.519 ± 1.729 ns/op
GrpcUtilBenchmark.encodeOld 1000u sample 291613 92.320 ± 1.732 ns/op
GrpcUtilBenchmark.encodeOld 1000m sample 271871 93.447 ± 1.872 ns/op
GrpcUtilBenchmark.encodeOld 1000S sample 234932 117.956 ± 16.810 ns/op
GrpcUtilBenchmark.encodeOld 1000M sample 224636 124.310 ± 20.249 ns/op
GrpcUtilBenchmark.encodeOld 1000H sample 226764 130.803 ± 19.211 ns/op
GrpcUtilBenchmark.parseNew 1000n sample 320709 60.480 ± 1.303 ns/op
GrpcUtilBenchmark.parseNew 1000u sample 316349 64.447 ± 13.673 ns/op
GrpcUtilBenchmark.parseNew 1000m sample 318209 61.705 ± 2.580 ns/op
GrpcUtilBenchmark.parseNew 1000S sample 319629 59.342 ± 1.758 ns/op
GrpcUtilBenchmark.parseNew 1000M sample 305715 59.362 ± 1.489 ns/op
GrpcUtilBenchmark.parseNew 1000H sample 314919 60.224 ± 1.563 ns/op
GrpcUtilBenchmark.parseOld 1000n sample 279243 64.040 ± 1.510 ns/op
GrpcUtilBenchmark.parseOld 1000u sample 278008 71.313 ± 13.620 ns/op
GrpcUtilBenchmark.parseOld 1000m sample 272633 67.872 ± 2.967 ns/op
GrpcUtilBenchmark.parseOld 1000S sample 280955 63.966 ± 2.490 ns/op
GrpcUtilBenchmark.parseOld 1000M sample 257645 71.329 ± 2.117 ns/op
GrpcUtilBenchmark.parseOld 1000H sample 282510 68.425 ± 17.650 ns/op1 parent 8894769 commit 6d28a93
1 file changed
+31
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 52 | | |
60 | 53 | | |
61 | 54 | | |
| |||
490 | 483 | | |
491 | 484 | | |
492 | 485 | | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | 486 | | |
514 | 487 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
523 | 503 | | |
524 | | - | |
525 | 504 | | |
526 | 505 | | |
527 | 506 | | |
528 | 507 | | |
529 | 508 | | |
530 | 509 | | |
531 | | - | |
| 510 | + | |
532 | 511 | | |
533 | | - | |
534 | | - | |
535 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
536 | 527 | | |
537 | | - | |
538 | 528 | | |
539 | 529 | | |
540 | 530 | | |
| |||
0 commit comments