Commit 1fd2cba
committed
CASSGO-43: externally-defined type registration
The new RegisteredTypes struct can be used to register externally-defined
types. You'll need to define your own marshalling and unmarshalling code
as well as a TypeInfo implementation. The name and id MUST not collide
with existing and future native CQL types.
A lot of the type handling was refactored to use the new format for
types.
inet columns are now unmarshaled as net.IP which is a breaking change.
goos: linux
goarch: amd64
pkg: github.com/gocql/gocql
cpu: AMD EPYC 7B13
│ old.txt │ new3.txt │
│ sec/op │ sec/op vs base │
SingleConn-16 25.87µ ± 2% 26.49µ ± 1% +2.40% (p=0.000 n=10)
ParseRowsFrame-16 870.5n ± 3% 683.1n ± 4% -21.52% (p=0.000 n=10)
UnmarshalVarchar-16 47.29n ± 2%
UnmarshalUUID-16 3.161n ± 2%
Unmarshal_BigInt-16 17.61n ± 9% 13.47n ± 0% -23.48% (p=0.000 n=10)
Unmarshal_Blob-16 19.19n ± 0% 14.79n ± 2% -22.88% (p=0.000 n=10)
Unmarshal_Boolean-16 15.71n ± 0% 12.20n ± 1% -22.32% (p=0.000 n=10)
Unmarshal_Date-16 18.53n ± 1% 15.98n ± 0% -13.73% (p=0.000 n=10)
Unmarshal_Decimal-16 172.15n ± 2% 96.55n ± 1% -43.92% (p=0.000 n=10)
Unmarshal_Double-16 16.33n ± 1% 12.21n ± 0% -25.20% (p=0.000 n=10)
Unmarshal_Duration-16 26.03n ± 1% 22.30n ± 1% -14.33% (p=0.000 n=10)
Unmarshal_Float-16 15.70n ± 0% 12.21n ± 0% -22.17% (p=0.000 n=10)
Unmarshal_Int-16 17.80n ± 1% 14.43n ± 0% -18.96% (p=0.000 n=10)
Unmarshal_Inet-16 28.68n ± 1% 25.25n ± 1% -11.96% (p=0.000 n=10)
Unmarshal_SmallInt-16 17.92n ± 1% 14.45n ± 1% -19.37% (p=0.000 n=10)
Unmarshal_Time-16 16.00n ± 1% 12.25n ± 3% -23.47% (p=0.000 n=10)
Unmarshal_Timestamp-16 16.00n ± 2% 12.23n ± 0% -23.62% (p=0.000 n=10)
Unmarshal_TinyInt-16 16.38n ± 3% 14.40n ± 1% -12.09% (p=0.000 n=10)
Unmarshal_UUID-16 16.05n ± 1% 12.56n ± 1% -21.77% (p=0.000 n=10)
Unmarshal_Varchar-16 18.86n ± 1% 14.81n ± 1% -21.43% (p=0.000 n=10)
Unmarshal_List-16 176.2n ± 4% 172.9n ± 1% -1.90% (p=0.002 n=10)
Unmarshal_Set-16 177.7n ± 1% 172.9n ± 0% -2.67% (p=0.000 n=10)
Unmarshal_Map-16 374.0n ± 5% 348.0n ± 2% -6.94% (p=0.000 n=10)
Unmarshal_TupleStrings-16 387.9n ± 1% 206.1n ± 1% -46.85% (p=0.000 n=10)
Unmarshal_TupleInterfaces-16 485.4n ± 2% 289.6n ± 3% -40.34% (p=0.000 n=10)
FramerReadTypeInfo-16 207.8n ± 3% 168.6n ± 5% -18.89% (p=0.000 n=10)
ConnStress-16 14.10µ ± 16% 16.05µ ± 19% ~ (p=0.363 n=10)
ConnRoutingKey-16 275.3n ± 4% 276.9n ± 2% ~ (p=0.869 n=10)
WikiCreateSchema-16 515.9m ± 3% 484.9m ± 3% -6.02% (p=0.000 n=10)
WikiCreatePages-16 1.534m ± 1% 1.469m ± 1% -4.21% (p=0.000 n=10)
WikiSelectAllPages-16 1.982m ± 3% 1.900m ± 1% -4.13% (p=0.000 n=10)
WikiSelectSinglePage-16 1.529m ± 2% 1.472m ± 0% -3.72% (p=0.000 n=10)
WikiSelectPageCount-16 1.691m ± 2% 1.629m ± 2% -3.67% (p=0.000 n=10)
FramerReadCol-16 107.7n ± 3% 124.6n ± 1% +15.79% (p=0.000 n=10)
geomean 375.5n 391.1n -15.90% ¹
¹ benchmark set differs from baseline; geomeans may not be comparable
│ old.txt │ new3.txt │
│ B/op │ B/op vs base │
SingleConn-16 3.155Ki ± 0% 3.157Ki ± 0% +0.06% (p=0.000 n=10)
ParseRowsFrame-16 1128.0 ± 0% 872.0 ± 0% -22.70% (p=0.000 n=10)
UnmarshalVarchar-16 32.00 ± 0%
UnmarshalUUID-16 0.000 ± 0%
Unmarshal_BigInt-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Blob-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Boolean-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Date-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Decimal-16 96.00 ± 0% 48.00 ± 0% -50.00% (p=0.000 n=10)
Unmarshal_Double-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Duration-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Float-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Int-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Inet-16 4.000 ± 0% 4.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_SmallInt-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Time-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Timestamp-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_TinyInt-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_UUID-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Varchar-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_List-16 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Set-16 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Map-16 280.0 ± 0% 280.0 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_TupleStrings-16 158.00 ± 0% 62.00 ± 0% -60.76% (p=0.000 n=10)
Unmarshal_TupleInterfaces-16 190.00 ± 0% 94.00 ± 0% -50.53% (p=0.000 n=10)
FramerReadTypeInfo-16 160.00 ± 0% 96.00 ± 0% -40.00% (p=0.000 n=10)
ConnStress-16 2.956Ki ± 0% 2.958Ki ± 0% ~ (p=0.238 n=10)
ConnRoutingKey-16 96.00 ± 0% 96.00 ± 0% ~ (p=1.000 n=10) ¹
WikiCreateSchema-16 59.90Ki ± 3% 57.90Ki ± 1% -3.34% (p=0.004 n=10)
WikiCreatePages-16 4.357Ki ± 0% 4.355Ki ± 0% ~ (p=0.236 n=10)
WikiSelectAllPages-16 38.32Ki ± 0% 38.32Ki ± 0% ~ (p=0.322 n=10)
WikiSelectSinglePage-16 3.783Ki ± 0% 3.781Ki ± 0% ~ (p=0.239 n=10)
WikiSelectPageCount-16 3.215Ki ± 0% 3.212Ki ± 0% ~ (p=0.232 n=10)
FramerReadCol-16 99.00 ± 0% 67.00 ± 0% -32.32% (p=0.000 n=10)
geomean ² -10.43% ³ ²
¹ all samples are equal
² summaries must be >0 to compute geomean
³ benchmark set differs from baseline; geomeans may not be comparable
│ old.txt │ new3.txt │
│ allocs/op │ allocs/op vs base │
SingleConn-16 37.00 ± 0% 37.00 ± 0% ~ (p=1.000 n=10) ¹
ParseRowsFrame-16 21.00 ± 0% 13.00 ± 0% -38.10% (p=0.000 n=10)
UnmarshalVarchar-16 1.000 ± 0%
UnmarshalUUID-16 0.000 ± 0%
Unmarshal_BigInt-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Blob-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Boolean-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Date-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Decimal-16 4.000 ± 0% 3.000 ± 0% -25.00% (p=0.000 n=10)
Unmarshal_Double-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Duration-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Float-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Int-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Inet-16 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_SmallInt-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Time-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Timestamp-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_TinyInt-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_UUID-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Varchar-16 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_List-16 2.000 ± 0% 2.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Set-16 2.000 ± 0% 2.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_Map-16 5.000 ± 0% 5.000 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal_TupleStrings-16 8.000 ± 0% 4.000 ± 0% -50.00% (p=0.000 n=10)
Unmarshal_TupleInterfaces-16 10.000 ± 0% 6.000 ± 0% -40.00% (p=0.000 n=10)
FramerReadTypeInfo-16 4.000 ± 0% 4.000 ± 0% ~ (p=1.000 n=10) ¹
ConnStress-16 35.00 ± 0% 35.00 ± 0% ~ (p=1.000 n=10)
ConnRoutingKey-16 4.000 ± 0% 4.000 ± 0% ~ (p=1.000 n=10) ¹
WikiCreateSchema-16 858.0 ± 3% 746.0 ± 1% -13.05% (p=0.000 n=10)
WikiCreatePages-16 56.00 ± 2% 56.00 ± 2% ~ (p=1.000 n=10)
WikiSelectAllPages-16 343.0 ± 0% 343.0 ± 0% ~ (p=1.000 n=10) ¹
WikiSelectSinglePage-16 50.00 ± 0% 50.00 ± 0% ~ (p=1.000 n=10) ¹
WikiSelectPageCount-16 45.00 ± 0% 45.00 ± 0% ~ (p=1.000 n=10) ¹
FramerReadCol-16 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹
geomean ² -6.38% ³ ²
¹ all samples are equal
² summaries must be >0 to compute geomean
³ benchmark set differs from baseline; geomeans may not be comparable
Patch by James Hartig for CASSGO-43; reviewed by João Reis for CASSGO-431 parent 90bcc9c commit 1fd2cba
File tree
24 files changed
+4515
-2499
lines changed24 files changed
+4515
-2499
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
40 | 41 | | |
41 | | - | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
53 | | - | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
| 648 | + | |
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
1071 | | - | |
| 1071 | + | |
1072 | 1072 | | |
1073 | 1073 | | |
1074 | 1074 | | |
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
1081 | | - | |
| 1081 | + | |
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
| 1128 | + | |
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
| 1160 | + | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | | - | |
| 1163 | + | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
| 1166 | + | |
1167 | 1167 | | |
1168 | 1168 | | |
1169 | | - | |
| 1169 | + | |
1170 | 1170 | | |
1171 | 1171 | | |
1172 | | - | |
| 1172 | + | |
1173 | 1173 | | |
1174 | 1174 | | |
1175 | | - | |
| 1175 | + | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | | - | |
| 1178 | + | |
1179 | 1179 | | |
1180 | 1180 | | |
1181 | | - | |
| 1181 | + | |
1182 | 1182 | | |
1183 | | - | |
1184 | | - | |
| 1183 | + | |
| 1184 | + | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | | - | |
| 1191 | + | |
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | | - | |
| 1195 | + | |
1196 | 1196 | | |
1197 | 1197 | | |
1198 | | - | |
| 1198 | + | |
1199 | 1199 | | |
1200 | 1200 | | |
1201 | | - | |
| 1201 | + | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
1205 | 1259 | | |
1206 | 1260 | | |
1207 | 1261 | | |
| |||
1278 | 1332 | | |
1279 | 1333 | | |
1280 | 1334 | | |
1281 | | - | |
| 1335 | + | |
1282 | 1336 | | |
1283 | 1337 | | |
1284 | 1338 | | |
| |||
1598 | 1652 | | |
1599 | 1653 | | |
1600 | 1654 | | |
1601 | | - | |
| 1655 | + | |
1602 | 1656 | | |
1603 | 1657 | | |
1604 | 1658 | | |
| |||
2497 | 2551 | | |
2498 | 2552 | | |
2499 | 2553 | | |
2500 | | - | |
2501 | 2554 | | |
2502 | 2555 | | |
2503 | 2556 | | |
2504 | | - | |
| 2557 | + | |
2505 | 2558 | | |
2506 | | - | |
| 2559 | + | |
2507 | 2560 | | |
2508 | | - | |
2509 | | - | |
2510 | 2561 | | |
2511 | | - | |
2512 | | - | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
2513 | 2566 | | |
2514 | 2567 | | |
2515 | 2568 | | |
| |||
2522 | 2575 | | |
2523 | 2576 | | |
2524 | 2577 | | |
2525 | | - | |
| 2578 | + | |
2526 | 2579 | | |
2527 | 2580 | | |
2528 | 2581 | | |
2529 | | - | |
| 2582 | + | |
2530 | 2583 | | |
2531 | 2584 | | |
2532 | 2585 | | |
| |||
2548 | 2601 | | |
2549 | 2602 | | |
2550 | 2603 | | |
2551 | | - | |
2552 | 2604 | | |
2553 | 2605 | | |
2554 | 2606 | | |
2555 | 2607 | | |
2556 | 2608 | | |
2557 | 2609 | | |
2558 | | - | |
2559 | | - | |
2560 | 2610 | | |
2561 | | - | |
2562 | | - | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
2563 | 2615 | | |
2564 | 2616 | | |
2565 | | - | |
| 2617 | + | |
2566 | 2618 | | |
2567 | 2619 | | |
2568 | 2620 | | |
2569 | | - | |
2570 | | - | |
2571 | 2621 | | |
2572 | | - | |
2573 | | - | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
2574 | 2626 | | |
2575 | 2627 | | |
2576 | 2628 | | |
| |||
2587 | 2639 | | |
2588 | 2640 | | |
2589 | 2641 | | |
2590 | | - | |
2591 | | - | |
2592 | 2642 | | |
2593 | | - | |
2594 | | - | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
2595 | 2647 | | |
2596 | 2648 | | |
2597 | 2649 | | |
2598 | 2650 | | |
2599 | | - | |
| 2651 | + | |
2600 | 2652 | | |
2601 | 2653 | | |
2602 | 2654 | | |
2603 | 2655 | | |
2604 | 2656 | | |
2605 | | - | |
| 2657 | + | |
2606 | 2658 | | |
2607 | 2659 | | |
2608 | 2660 | | |
| |||
2700 | 2752 | | |
2701 | 2753 | | |
2702 | 2754 | | |
2703 | | - | |
2704 | 2755 | | |
2705 | 2756 | | |
2706 | 2757 | | |
2707 | 2758 | | |
2708 | 2759 | | |
2709 | | - | |
2710 | | - | |
2711 | | - | |
2712 | | - | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
2713 | 2770 | | |
2714 | 2771 | | |
2715 | 2772 | | |
2716 | | - | |
| 2773 | + | |
2717 | 2774 | | |
2718 | 2775 | | |
2719 | 2776 | | |
| |||
3520 | 3577 | | |
3521 | 3578 | | |
3522 | 3579 | | |
3523 | | - | |
| 3580 | + | |
3524 | 3581 | | |
3525 | | - | |
| 3582 | + | |
3526 | 3583 | | |
3527 | 3584 | | |
3528 | 3585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
277 | 281 | | |
278 | 282 | | |
279 | 283 | | |
| |||
0 commit comments