Commit 5eec7ed
committed
perf: pre-compute int32_pack constants for null/unset markers
Replace per-call int32_pack(-1) and int32_pack(-2) with module-level
_INT32_NEG1 and _INT32_NEG2 constants. Avoids redundant struct packing
on every null or unset parameter in the inner write_value loop.
Benchmark: ~11% speedup on the parameter serialization loop for a
typical 12-param mix of values, nulls, and unsets.1 parent 6e0eb40 commit 5eec7ed
2 files changed
Lines changed: 79 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
594 | 598 | | |
595 | 599 | | |
596 | 600 | | |
597 | | - | |
| 601 | + | |
598 | 602 | | |
599 | | - | |
| 603 | + | |
600 | 604 | | |
601 | 605 | | |
602 | 606 | | |
| |||
943 | 947 | | |
944 | 948 | | |
945 | 949 | | |
946 | | - | |
| 950 | + | |
947 | 951 | | |
948 | | - | |
| 952 | + | |
949 | 953 | | |
950 | 954 | | |
951 | 955 | | |
| |||
0 commit comments