Reduce complex type usage
This is a very early draft. Currently works only for some basic types, and UUID.
This PR attempts to reduce usage of Compex type, by shifting parameters preparing (from all accepted formats) onto rust side and as a result, reducing the need for the JS side to know expected types.
30% improvement for time elapsed and 20% for task clock
Before:
sudo perf stat node ./benchmark/logic/concurrent_insert.js scylladb-javascript-driver 2000000
Performance counter stats for 'node ./benchmark/logic/concurrent_insert.js scylladb-javascript-driver 2000000':
118,291.96 msec task-clock # 2.380 CPUs utilized
3,706,295 context-switches # 31.332 K/sec
206,323 cpu-migrations # 1.744 K/sec
428,074 page-faults # 3.619 K/sec
459,702,397,261 cycles # 3.886 GHz
183,584,434,064 stalled-cycles-frontend # 39.94% frontend cycles idle
335,176,259,143 instructions # 0.73 insn per cycle
# 0.55 stalled cycles per insn
65,323,848,951 branches # 552.226 M/sec
3,100,074,370 branch-misses # 4.75% of all branches
49.711533158 seconds time elapsed
72.887237000 seconds user
47.781235000 seconds sys
After:
sudo perf stat node ./benchmark/logic/concurrent_insert.js scylladb-javascript-driver 2000000
Performance counter stats for 'node ./benchmark/logic/concurrent_insert.js scylladb-javascript-driver 2000000':
97,353.41 msec task-clock # 2.836 CPUs utilized
2,361,289 context-switches # 24.255 K/sec
275,625 cpu-migrations # 2.831 K/sec
422,072 page-faults # 4.335 K/sec
372,492,719,364 cycles # 3.826 GHz
169,074,225,002 stalled-cycles-frontend # 45.39% frontend cycles idle
263,664,151,995 instructions # 0.71 insn per cycle
# 0.64 stalled cycles per insn
51,895,019,049 branches # 533.058 M/sec
2,752,008,302 branch-misses # 5.30% of all branches
34.321760331 seconds time elapsed
57.348979000 seconds user
41.203228000 seconds sys