Repository navigation
Commit 2f06db7
committed
measure(harness): the PK comparison publishes BOTH postures; at-rest tax attributed (GCM explains ~15%)
Steps 1+2 of the agreed sequence, executed.
Step 1 - honest publication (plan section 0.1-6): the --pk runner gained a third SharpCoreDB arm
(fixed-width, at-rest default, read from a fresh DatabaseConfig so it cannot drift), every label carries the
posture, and it prints per-posture gaps vs SQLite plus a per-operation at-rest tax. Result:
arm INSERT READ UPDATE DELETE
FW plaintext 120,832 114,747 238,446 162,449
FW at-rest (default) 63,532 75,875 147,458 147,964
SQLite 180,200 101,020 268,956 366,695
Gaps vs SQLite in the shipping posture: UPDATE 1.8x, DELETE 2.5x, INSERT 2.8x, READ 1.33x - not the ~1.1x
the raw-only report implied.
Step 2 - where the tax goes. At-rest tax per operation: INSERT 1.90x, READ 1.51x, UPDATE 1.62x, DELETE 1.10x
(spread across the path, not concentrated on one operation). Crypto split at 120-byte payloads, 200K iters:
Encrypt as shipped 1.34us | Decrypt 1.01us | fresh AesGcm ctor 0.69us | OS CSPRNG nonce 0.10us
raw AEAD with a pooled cipher + counter nonce 0.27us (setup share of Encrypt: 59%)
So per-call cipher setup is 59% of Encrypt and pooling it is ~5x on that call - but it is only ~15% of the
UPDATE tax and less of the INSERT tax: one 1.34us Encrypt cannot explain +7.4us/row. The index build is not
the cause either: with hash indexes off the at-rest INSERT tax is still 1.76x (103,754 -> 59,083 ops/s).
Also found, and posture-independent: hash indexes cost 28% of INSERT in both postures
(74,605 -> 103,754 plaintext), which makes them a lever of their own.
Open, recorded in the plan: ~6us/row of the at-rest INSERT cost is still unattributed; the next probe is
per-row allocation/GC counts plus the pooled-cipher prototype IN THE PRODUCT, since a standalone Encrypt
timing may not survive the insert path's allocation pressure.
Gate: SharpCoreDB.slnx 0 errors (harness included); SharpCoreDB.Tests 1848 / 0 failed / 16 skipped.
No product code changed - measurement and documentation only; all temp probes removed.1 parent dea9bbb commit 2f06db7
2 files changed
Lines changed: 69 additions & 12 deletions
File tree
- docs/performance
- tests/benchmarks/SharpCoreDB.Benchmarks.Comparative
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
843 | 843 | | |
844 | 844 | | |
845 | 845 | | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
846 | 881 | | |
847 | 882 | | |
848 | 883 | | |
| |||
Lines changed: 34 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
975 | 977 | | |
976 | 978 | | |
977 | 979 | | |
| |||
992 | 994 | | |
993 | 995 | | |
994 | 996 | | |
995 | | - | |
| 997 | + | |
996 | 998 | | |
997 | 999 | | |
998 | 1000 | | |
| |||
1143 | 1145 | | |
1144 | 1146 | | |
1145 | 1147 | | |
1146 | | - | |
| 1148 | + | |
1147 | 1149 | | |
1148 | 1150 | | |
1149 | 1151 | | |
1150 | | - | |
| 1152 | + | |
1151 | 1153 | | |
1152 | 1154 | | |
1153 | 1155 | | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1154 | 1163 | | |
1155 | 1164 | | |
1156 | 1165 | | |
1157 | 1166 | | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
1164 | 1185 | | |
1165 | 1186 | | |
1166 | 1187 | | |
1167 | | - | |
1168 | | - | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1169 | 1191 | | |
1170 | 1192 | | |
1171 | 1193 | | |
| |||
0 commit comments