Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(ffi/unstable): Use BigInt representation in turbocall #23983

Merged

Conversation

aapoalas
Copy link
Collaborator

Built ontop of #23981 and should only be merged after it; this sets FFI turbocalls (Fast Call API) to use the BigInt representation.

@aapoalas aapoalas requested review from littledivy and bartlomieju and removed request for littledivy May 25, 2024 10:23
@aapoalas
Copy link
Collaborator Author

aapoalas commented May 25, 2024

Performance benchmarks:

This branch

cpu: AMD Ryzen 5 3600 6-Core Processor
runtime: deno 1.43.6 (x86_64-unknown-linux-gnu)

benchmark                                time (avg)        iter/s             (min … max)       p75       p99      p995
----------------------------------------------------------------------------------------- -----------------------------
nop()                                     5.89 ns/iter 169,858,530.1    (5.72 ns … 20.88 ns) 5.74 ns 8.68 ns 16.82 ns
hash()                                   58.67 ns/iter  17,045,476.0   (56.46 ns … 73.33 ns) 58.6 ns 71.21 ns 71.39 ns
c string                                 98.68 ns/iter  10,133,389.6  (91.16 ns … 138.32 ns) 100.53 ns 116.98 ns 122.06 ns
add_u32()                                 5.88 ns/iter 170,125,875.2    (5.78 ns … 15.74 ns) 5.78 ns 9.25 ns 10.11 ns
return_buffer()                           7.46 ns/iter 134,034,090.9    (6.39 ns … 27.07 ns) 7.49 ns 12.36 ns 12.9 ns
add_u64() number                        169.91 ns/iter   5,885,462.7 (155.01 ns … 190.89 ns) 180.07 ns 185.28 ns 190 ns
add_u64() bigint                          7.81 ns/iter 128,004,245.7    (6.75 ns … 35.29 ns) 7.83 ns 13.21 ns 16.5 ns
return_u64()                              7.91 ns/iter 126,449,814.6     (6.9 ns … 20.21 ns) 8.03 ns 13.89 ns 14.76 ns
return_i64()                              7.65 ns/iter 130,788,780.3    (6.87 ns … 16.92 ns) 7.64 ns 13.43 ns 13.65 ns
nop_bool()                                5.57 ns/iter 179,467,925.6     (5.48 ns … 7.03 ns) 5.57 ns 6.05 ns 6.09 ns
nop_u8()                                  5.58 ns/iter 179,279,723.0     (5.48 ns … 8.02 ns) 5.58 ns 6.05 ns 6.11 ns
nop_i8()                                  5.64 ns/iter 177,166,382.7    (5.48 ns … 11.96 ns) 5.58 ns 9.44 ns 9.61 ns
nop_u16()                                 5.61 ns/iter 178,328,130.8     (5.48 ns … 9.07 ns) 5.6 ns 6.85 ns 6.86 ns
nop_i16()                                 5.57 ns/iter 179,398,079.9     (5.48 ns … 8.47 ns) 5.57 ns 6.04 ns 6.09 ns
nop_u32()                                 5.62 ns/iter 178,089,622.7     (5.54 ns … 8.64 ns) 5.61 ns 6.17 ns 6.63 ns
nop_i32()                                  5.6 ns/iter 178,488,226.6    (5.51 ns … 10.73 ns) 5.59 ns 6.12 ns 6.34 ns
nop_u64() number                         125.8 ns/iter   7,949,243.7 (118.95 ns … 145.68 ns) 127.52 ns 134.54 ns 141.28 ns
nop_u64() bigint                          5.98 ns/iter 167,303,280.5    (5.55 ns … 39.26 ns) 5.59 ns 10.57 ns 13.77 ns
nop_i64() number                        121.93 ns/iter   8,201,262.1 (116.48 ns … 138.64 ns) 122.95 ns 130.29 ns 130.51 ns
nop_i64() bigint                           5.6 ns/iter 178,578,391.8     (5.55 ns … 8.86 ns) 5.59 ns 6.09 ns 6.12 ns
nop_usize() number                      122.44 ns/iter   8,167,532.9 (117.53 ns … 141.14 ns) 123.7 ns 130.85 ns 132.9 ns
nop_usize() bigint                        5.59 ns/iter 178,886,594.7      (5.54 ns … 8.7 ns) 5.59 ns 6.05 ns 6.12 ns
nop_isize() number                      119.93 ns/iter   8,338,216.4 (115.98 ns … 137.25 ns) 120.59 ns 125.04 ns 130.16 ns
nop_isize() bigint                        5.62 ns/iter 178,024,056.8     (5.55 ns … 8.72 ns) 5.6 ns 6.18 ns 6.51 ns
nop_f32()                                 5.55 ns/iter 180,083,654.3      (5.5 ns … 8.64 ns) 5.53 ns 6.06 ns 6.25 ns
nop_f64()                                 5.56 ns/iter 179,976,792.2     (5.47 ns … 9.19 ns) 5.55 ns 6.06 ns 6.12 ns
nop_buffer()                              6.58 ns/iter 152,005,085.8    (6.52 ns … 10.45 ns) 6.57 ns 7.08 ns 7.16 ns
return_bool()                             5.74 ns/iter 174,184,463.8     (5.54 ns … 9.23 ns) 5.72 ns 8.7 ns 8.7 ns
return_u8()                               6.04 ns/iter 165,541,261.1     (6.02 ns … 9.88 ns) 6.02 ns 6.55 ns 6.66 ns
return_i8()                               5.87 ns/iter 170,360,734.8     (5.78 ns … 9.67 ns) 5.85 ns 6.37 ns 6.58 ns
return_u16()                              6.11 ns/iter 163,611,330.4    (6.02 ns … 12.29 ns) 6.02 ns 9.6 ns 9.69 ns
return_i16()                              5.86 ns/iter 170,668,077.4     (5.78 ns … 9.07 ns) 5.85 ns 6.32 ns 6.38 ns
return_u32()                              7.65 ns/iter 130,693,972.4    (6.34 ns … 23.77 ns) 7.66 ns 13.59 ns 15.05 ns
return_i32()                              7.47 ns/iter 133,801,766.1     (6.53 ns … 23.6 ns) 7.54 ns 14.14 ns 16.72 ns
return_usize()                            7.96 ns/iter 125,671,254.5    (6.93 ns … 24.19 ns) 7.99 ns 15.26 ns 16.73 ns
return_isize()                            8.28 ns/iter 120,742,501.5    (6.84 ns … 30.65 ns) 8.09 ns 14.87 ns 17.58 ns
return_f32()                              7.27 ns/iter 137,526,006.4    (6.31 ns … 18.96 ns) 7.61 ns 12.86 ns 13.47 ns
return_f64()                              6.89 ns/iter 145,139,541.5    (6.38 ns … 19.32 ns) 7.06 ns 12.37 ns 12.79 ns
nop_nonblocking()                        13.46 µs/iter      74,305.2   (9.54 µs … 294.53 µs) 13.86 µs 15.94 µs 17.52 µs
nop_bool_nonblocking()                   14.04 µs/iter      71,245.4     (5.04 µs … 1.98 ms) 14.48 µs 18.72 µs 21.11 µs
nop_u8_nonblocking()                     14.75 µs/iter      67,778.2   (11.4 µs … 216.24 µs) 14.73 µs 19.22 µs 20.49 µs
nop_i8_nonblocking()                     14.46 µs/iter      69,156.3   (13.3 µs … 204.45 µs) 14.61 µs 17.4 µs 18.96 µs
nop_u16_nonblocking()                    13.87 µs/iter      72,124.1    (9.92 µs … 196.8 µs) 14.38 µs 17.73 µs 18.81 µs
nop_i16_nonblocking()                    12.94 µs/iter      77,297.7   (8.24 µs … 193.78 µs) 14.15 µs 17.06 µs 18.26 µs
nop_u32_nonblocking()                    13.49 µs/iter      74,129.0   (8.25 µs … 233.67 µs) 14.32 µs 19.09 µs 20.76 µs
nop_i32_nonblocking()                    11.67 µs/iter      85,667.8   (6.79 µs … 592.88 µs) 12.62 µs 17.78 µs 20.23 µs
nop_u64_nonblocking() number             12.53 µs/iter      79,783.0   (9.95 µs … 205.49 µs) 12.91 µs 14.78 µs 16.66 µs
nop_u64_nonblocking() bigint              12.3 µs/iter      81,267.8   (7.86 µs … 197.31 µs) 12.93 µs 14.21 µs 15.49 µs
nop_i64_nonblocking() number              12.9 µs/iter      77,495.4   (7.95 µs … 626.82 µs) 13.29 µs 19.89 µs 21.08 µs
nop_i64_nonblocking() bigint             14.86 µs/iter      67,317.4   (4.24 µs … 552.03 µs) 16.24 µs 22.3 µs 26.81 µs
nop_usize_nonblocking() number            13.7 µs/iter      72,976.7     (4.68 µs … 3.36 ms) 14.64 µs 19.34 µs 21.86 µs
nop_usize_nonblocking() bigint            12.8 µs/iter      78,137.2   (8.74 µs … 718.19 µs) 13.96 µs 18.28 µs 21.04 µs
nop_isize_nonblocking() number           13.72 µs/iter      72,891.6    (8.4 µs … 509.78 µs) 14.25 µs 19.89 µs 23.53 µs
nop_isize_nonblocking() bigint           12.71 µs/iter      78,678.2   (8.97 µs … 211.42 µs) 14 µs 16.6 µs 17.66 µs
nop_f32_nonblocking()                    12.03 µs/iter      83,146.3   (8.01 µs … 508.74 µs) 12.65 µs 18.55 µs 20.59 µs
nop_f64_nonblocking()                    11.58 µs/iter      86,326.0    (6.4 µs … 192.07 µs) 12.66 µs 13.3 µs 14.4 µs
nop_buffer_nonblocking()                 11.44 µs/iter      87,427.9    (9.23 µs … 207.1 µs) 12.57 µs 13.67 µs 15.29 µs
return_bool_nonblocking()                12.57 µs/iter      79,522.9    (5.9 µs … 210.16 µs) 13.7 µs 18.63 µs 20.61 µs
return_u8_nonblocking()                  12.92 µs/iter      77,393.4   (6.29 µs … 821.89 µs) 13.7 µs 18.6 µs 20.71 µs
return_i8_nonblocking()                     11 µs/iter      90,909.1    (8.6 µs … 634.71 µs) 10.61 µs 15.4 µs 16.54 µs
return_u16_nonblocking()                  12.4 µs/iter      80,632.2  (10.25 µs … 193.17 µs) 12.5 µs 13.86 µs 14.9 µs
return_i16_nonblocking()                 10.99 µs/iter      90,983.5     (3.54 µs … 2.87 ms) 10.77 µs 13.3 µs 14.43 µs
return_u32_nonblocking()                 10.98 µs/iter      91,033.2   (8.49 µs … 194.85 µs) 10.89 µs 13.24 µs 14.53 µs
return_i32_nonblocking()                 11.63 µs/iter      85,947.6   (8.62 µs … 195.65 µs) 12.82 µs 13.61 µs 14.69 µs
return_u64_nonblocking()                 11.31 µs/iter      88,378.3   (8.76 µs … 176.36 µs) 12.65 µs 13.43 µs 14.49 µs
return_i64_nonblocking()                 11.25 µs/iter      88,896.8   (6.25 µs … 212.18 µs) 11.81 µs 13.34 µs 14.24 µs
return_usize_nonblocking()               10.73 µs/iter      93,222.7   (4.18 µs … 205.22 µs) 10.69 µs 13.19 µs 13.88 µs
return_isize_nonblocking()                11.6 µs/iter      86,184.6   (7.44 µs … 206.01 µs) 12.52 µs 13.4 µs 14.68 µs
return_f32_nonblocking()                 11.81 µs/iter      84,659.7   (7.41 µs … 204.22 µs) 12.76 µs 13.56 µs 14.67 µs
return_f64_nonblocking()                 10.76 µs/iter      92,945.4   (9.33 µs … 156.87 µs) 10.77 µs 13.15 µs 13.86 µs
return_buffer_nonblocking()              10.96 µs/iter      91,207.6   (2.05 µs … 182.99 µs) 10.89 µs 13.48 µs 14.26 µs
nop_many_parameters()                    26.49 ns/iter  37,743,237.0   (25.38 ns … 47.21 ns) 25.98 ns 39.71 ns 41.41 ns
nop_many_parameters_nonblocking()         6.03 µs/iter     165,931.6     (5.12 µs … 6.99 µs) 6.36 µs 6.99 µs 6.99 µs
Deno.UnsafePointer.of                   612.98 ns/iter   1,631,367.5   (156.86 ns … 9.59 µs) 361.45 ns 6.92 µs 9.59 µs
Deno.UnsafePointer.value                 38.18 ns/iter  26,193,699.5  (36.72 ns … 506.74 ns) 37.91 ns 47.4 ns 51.52 ns
Deno.UnsafePointerView#getCString         81.8 ns/iter  12,225,564.9  (75.52 ns … 102.13 ns) 83.6 ns 90.68 ns 92.42 ns
Deno.UnsafePointerView#getBool           31.01 ns/iter  32,247,654.0   (30.26 ns … 39.97 ns) 31.06 ns 32.04 ns 33.96 ns
Deno.UnsafePointerView#getUint8           31.1 ns/iter  32,158,755.3    (29.65 ns … 45.9 ns) 31.23 ns 44.92 ns 45.09 ns
Deno.UnsafePointerView#getInt8           30.94 ns/iter  32,325,728.6   (29.96 ns … 54.22 ns) 31.04 ns 36.32 ns 47.38 ns
Deno.UnsafePointerView#getUint16         30.91 ns/iter  32,350,396.2   (29.65 ns … 53.93 ns) 30.79 ns 50.48 ns 52.22 ns
Deno.UnsafePointerView#getInt16          31.23 ns/iter  32,016,918.9   (29.89 ns … 55.91 ns) 31.29 ns 51.89 ns 52.93 ns
Deno.UnsafePointerView#getUint32         30.53 ns/iter  32,752,577.5   (29.54 ns … 46.73 ns) 30.81 ns 33.58 ns 35.11 ns
Deno.UnsafePointerView#getInt32          37.98 ns/iter  26,331,093.9    (37.62 ns … 60.6 ns) 37.63 ns 52.67 ns 56.29 ns
Deno.UnsafePointerView#getBigUint64      33.19 ns/iter  30,129,229.9   (31.68 ns … 51.78 ns) 33.17 ns 40.71 ns 42.01 ns
Deno.UnsafePointerView#getBigInt64       34.56 ns/iter  28,939,125.6   (31.73 ns … 71.99 ns) 33.88 ns 52.66 ns 53.67 ns
Deno.UnsafePointerView#getFloat32        32.03 ns/iter  31,220,869.0   (31.09 ns … 67.03 ns) 32.16 ns 43.68 ns 46.87 ns
Deno.UnsafePointerView#getFloat64        40.46 ns/iter  24,712,761.2   (39.04 ns … 62.68 ns) 39.92 ns 54.9 ns 55.93 ns

deno release

cpu: AMD Ryzen 5 3600 6-Core Processor
runtime: deno 1.43.3 (x86_64-unknown-linux-gnu)

benchmark                                time (avg)        iter/s             (min … max)       p75       p99      p995
----------------------------------------------------------------------------------------- -----------------------------
nop()                                     5.62 ns/iter 177,791,597.3    (5.49 ns … 19.68 ns) 5.6 ns 6.43 ns 6.54 ns
hash()                                   57.04 ns/iter  17,530,201.0   (55.84 ns … 70.45 ns) 57.03 ns 66.34 ns 68.87 ns
c string                                102.91 ns/iter   9,717,268.5  (95.13 ns … 143.87 ns) 104.18 ns 127.08 ns 129.47 ns
add_u32()                                 5.88 ns/iter 170,184,684.1     (5.49 ns … 19.3 ns) 5.62 ns 9.63 ns 10.23 ns
return_buffer()                           5.68 ns/iter 176,190,457.4    (5.53 ns … 11.21 ns) 5.65 ns 6.43 ns 7.4 ns
add_u64() number                          8.48 ns/iter 117,944,645.1    (8.32 ns … 13.29 ns) 8.46 ns 9.01 ns 9.23 ns
add_u64() bigint                        216.25 ns/iter   4,624,232.1 (206.66 ns … 257.08 ns) 218.27 ns 233.23 ns 241.64 ns
return_u64()                              8.44 ns/iter 118,521,214.6    (8.19 ns … 27.19 ns) 8.43 ns 9.73 ns 10.39 ns
return_i64()                             35.71 ns/iter  28,005,462.3    (32.8 ns … 42.41 ns) 35.98 ns 40.75 ns 40.97 ns
nop_bool()                                5.98 ns/iter 167,339,143.8     (5.49 ns … 8.83 ns) 5.96 ns 6.44 ns 6.47 ns
nop_u8()                                  5.98 ns/iter 167,250,799.7    (5.49 ns … 14.56 ns) 5.96 ns 6.46 ns 6.49 ns
nop_i8()                                  5.98 ns/iter 167,349,902.9     (5.49 ns … 8.75 ns) 5.96 ns 6.46 ns 6.49 ns
nop_u16()                                 5.98 ns/iter 167,355,793.1     (5.49 ns … 8.78 ns) 5.96 ns 6.46 ns 6.49 ns
nop_i16()                                 5.98 ns/iter 167,335,092.5     (5.49 ns … 8.83 ns) 5.96 ns 6.46 ns 6.49 ns
nop_u32()                                 5.99 ns/iter 166,974,335.7     (5.51 ns … 8.72 ns) 5.96 ns 6.67 ns 6.68 ns
nop_i32()                                 5.98 ns/iter 167,314,164.1     (5.49 ns … 8.63 ns) 5.96 ns 6.46 ns 6.67 ns
nop_u64() number                          5.98 ns/iter 167,266,739.9     (5.49 ns … 9.18 ns) 5.96 ns 6.46 ns 6.52 ns
nop_u64() bigint                        110.56 ns/iter   9,044,860.2 (105.22 ns … 135.55 ns) 111.04 ns 113.55 ns 116.75 ns
nop_i64() number                          5.98 ns/iter 167,328,641.2     (5.49 ns … 9.11 ns) 5.96 ns 6.46 ns 6.49 ns
nop_i64() bigint                        108.36 ns/iter   9,228,725.5 (104.04 ns … 122.44 ns) 108.84 ns 119.91 ns 122.03 ns
nop_usize() number                        5.98 ns/iter 167,155,285.9     (5.49 ns … 8.39 ns) 5.96 ns 6.47 ns 7.86 ns
nop_usize() bigint                      109.68 ns/iter   9,117,775.2 (103.74 ns … 120.96 ns) 110.15 ns 119.23 ns 119.59 ns
nop_isize() number                        5.97 ns/iter 167,441,226.0     (5.96 ns … 7.34 ns) 5.96 ns 6.38 ns 6.49 ns
nop_isize() bigint                      108.43 ns/iter   9,222,142.9 (103.45 ns … 127.56 ns) 109.23 ns 117.33 ns 118.87 ns
nop_f32()                                 6.01 ns/iter 166,276,136.8    (5.49 ns … 25.09 ns) 5.96 ns 7.42 ns 8.37 ns
nop_f64()                                    6 ns/iter 166,564,888.8     (5.49 ns … 9.86 ns) 5.96 ns 6.99 ns 8.05 ns
nop_buffer()                              6.71 ns/iter 149,042,759.4    (6.51 ns … 13.62 ns) 6.64 ns 9.67 ns 9.84 ns
return_bool()                             6.03 ns/iter 165,744,543.0    (5.49 ns … 10.22 ns) 5.96 ns 8.66 ns 8.69 ns
return_u8()                               6.46 ns/iter 154,914,076.4    (5.96 ns … 10.86 ns) 6.44 ns 6.93 ns 7.1 ns
return_i8()                               6.45 ns/iter 155,040,930.9     (5.96 ns … 9.24 ns) 6.44 ns 6.89 ns 6.96 ns
return_u16()                              6.45 ns/iter 155,088,670.9     (5.96 ns … 8.82 ns) 6.44 ns 6.86 ns 6.93 ns
return_i16()                              6.45 ns/iter 155,050,558.3     (5.96 ns … 8.07 ns) 6.44 ns 6.9 ns 6.96 ns
return_u32()                              5.98 ns/iter 167,328,648.9     (5.65 ns … 9.58 ns) 5.96 ns 6.38 ns 6.46 ns
return_i32()                              5.97 ns/iter 167,457,257.8     (5.49 ns … 7.96 ns) 5.96 ns 6.37 ns 6.46 ns
return_usize()                            8.38 ns/iter 119,322,013.5    (8.29 ns … 12.96 ns) 8.38 ns 8.87 ns 8.91 ns
return_isize()                           34.58 ns/iter  28,916,427.0   (33.16 ns … 42.35 ns) 35.72 ns 40.53 ns 40.85 ns
return_f32()                              5.99 ns/iter 166,994,236.7     (5.5 ns … 19.89 ns) 5.96 ns 6.61 ns 6.82 ns
return_f64()                              5.98 ns/iter 167,217,213.0    (5.49 ns … 10.56 ns) 5.96 ns 6.49 ns 6.93 ns
nop_nonblocking()                        14.02 µs/iter      71,341.9   (7.27 µs … 503.62 µs) 14 µs 17.09 µs 18.28 µs
nop_bool_nonblocking()                   14.31 µs/iter      69,871.4    (7.83 µs … 262.8 µs) 14.45 µs 16.8 µs 18.08 µs
nop_u8_nonblocking()                     14.35 µs/iter      69,686.4  (11.07 µs … 283.54 µs) 14.45 µs 17.49 µs 18.95 µs
nop_i8_nonblocking()                      14.4 µs/iter      69,420.3  (11.43 µs … 226.23 µs) 14.56 µs 16.35 µs 17.94 µs
nop_u16_nonblocking()                    14.33 µs/iter      69,803.2   (9.51 µs … 227.73 µs) 14.43 µs 17.15 µs 18.27 µs
nop_i16_nonblocking()                    14.36 µs/iter      69,652.4  (13.27 µs … 245.96 µs) 14.49 µs 16.99 µs 18.39 µs
nop_u32_nonblocking()                    14.35 µs/iter      69,667.0  (13.18 µs … 371.84 µs) 14.52 µs 17.31 µs 18.49 µs
nop_i32_nonblocking()                    14.43 µs/iter      69,285.7   (9.16 µs … 217.41 µs) 14.61 µs 17.31 µs 18.61 µs
nop_u64_nonblocking() number             14.45 µs/iter      69,194.6  (13.35 µs … 243.82 µs) 14.6 µs 17.23 µs 18.86 µs
nop_u64_nonblocking() bigint             14.66 µs/iter      68,208.2     (7.65 µs … 4.21 ms) 14.69 µs 17.6 µs 18.79 µs
nop_i64_nonblocking() number             11.32 µs/iter      88,300.2   (7.57 µs … 275.82 µs) 10.94 µs 16.63 µs 17.57 µs
nop_i64_nonblocking() bigint             10.99 µs/iter      91,008.4   (6.79 µs … 279.09 µs) 10.91 µs 13.72 µs 14.17 µs
nop_usize_nonblocking() number           12.38 µs/iter      80,749.4   (9.28 µs … 237.38 µs) 13.71 µs 15.06 µs 16.31 µs
nop_usize_nonblocking() bigint           12.83 µs/iter      77,966.6   (9.18 µs … 273.14 µs) 14.05 µs 15.5 µs 16.43 µs
nop_isize_nonblocking() number           13.34 µs/iter      74,968.1    (8.91 µs … 293.2 µs) 14.01 µs 15.96 µs 17.19 µs
nop_isize_nonblocking() bigint            13.4 µs/iter      74,643.6  (10.04 µs … 281.69 µs) 14.07 µs 15.77 µs 17.41 µs
nop_f32_nonblocking()                    12.79 µs/iter      78,216.7   (8.42 µs … 285.89 µs) 13.9 µs 16.05 µs 17.26 µs
nop_f64_nonblocking()                    13.25 µs/iter      75,454.6   (9.82 µs … 289.74 µs) 14.02 µs 15.67 µs 16.77 µs
nop_buffer_nonblocking()                 13.11 µs/iter      76,254.4    (8.19 µs … 289.8 µs) 14.03 µs 16.54 µs 17.67 µs
return_bool_nonblocking()                13.13 µs/iter      76,161.5      (9.72 µs … 288 µs) 13.71 µs 15.32 µs 17.24 µs
return_u8_nonblocking()                  12.04 µs/iter      83,049.6      (7.1 µs … 1.22 ms) 12.52 µs 14.96 µs 15.79 µs
return_i8_nonblocking()                  12.19 µs/iter      82,014.3   (8.34 µs … 286.63 µs) 12.5 µs 17.38 µs 18.82 µs
return_u16_nonblocking()                 12.63 µs/iter      79,195.4   (9.55 µs … 295.46 µs) 13.59 µs 17.11 µs 18.33 µs
return_i16_nonblocking()                 12.94 µs/iter      77,279.8    (9.52 µs … 280.6 µs) 14 µs 17.74 µs 19.2 µs
return_u32_nonblocking()                 12.34 µs/iter      81,063.6   (9.01 µs … 284.62 µs) 13.54 µs 15.47 µs 17.25 µs
return_i32_nonblocking()                 12.68 µs/iter      78,889.2   (6.38 µs … 432.67 µs) 13.8 µs 16.1 µs 17.48 µs
return_u64_nonblocking()                 12.84 µs/iter      77,863.4    (9.14 µs … 449.3 µs) 13.68 µs 15.88 µs 17.66 µs
return_i64_nonblocking()                 12.55 µs/iter      79,694.0    (9.53 µs … 282.6 µs) 13.57 µs 15.53 µs 16.86 µs
return_usize_nonblocking()               12.43 µs/iter      80,457.0   (9.66 µs … 297.93 µs) 13.54 µs 15.5 µs 16.79 µs
return_isize_nonblocking()               12.64 µs/iter      79,113.9   (9.48 µs … 655.52 µs) 13.56 µs 15.43 µs 17.15 µs
return_f32_nonblocking()                 12.48 µs/iter      80,102.5   (8.54 µs … 255.29 µs) 13.56 µs 14.94 µs 16.25 µs
return_f64_nonblocking()                 12.93 µs/iter      77,363.5     (7.57 µs … 3.08 ms) 13.63 µs 16.65 µs 17.72 µs
return_buffer_nonblocking()              13.59 µs/iter      73,561.9   (9.47 µs … 259.61 µs) 13.71 µs 15.72 µs 17.96 µs
nop_many_parameters()                   790.01 ns/iter   1,265,806.8 (777.84 ns … 847.86 ns) 790.18 ns 847.86 ns 847.86 ns
nop_many_parameters_nonblocking()         6.23 µs/iter     160,430.6     (5.69 µs … 6.97 µs) 6.51 µs 6.97 µs 6.97 µs
Deno.UnsafePointer.of                   412.24 ns/iter   2,425,789.5  (167.39 ns … 11.96 µs) 353.31 ns 6.34 µs 11.96 µs
Deno.UnsafePointer.value                 45.92 ns/iter  21,778,341.1   (45.24 ns … 50.83 ns) 46.67 ns 48.1 ns 48.33 ns
Deno.UnsafePointerView#getCString        81.82 ns/iter  12,221,580.1  (78.16 ns … 111.57 ns) 82.77 ns 102.51 ns 104.17 ns
Deno.UnsafePointerView#getBool           34.08 ns/iter  29,340,691.7   (33.29 ns … 37.15 ns) 34.41 ns 35.72 ns 35.78 ns
Deno.UnsafePointerView#getUint8          34.37 ns/iter  29,092,775.0   (32.39 ns … 40.06 ns) 35.07 ns 38.16 ns 39.53 ns
Deno.UnsafePointerView#getInt8           33.21 ns/iter  30,113,399.1   (32.58 ns … 38.34 ns) 33.34 ns 35.45 ns 35.56 ns
Deno.UnsafePointerView#getUint16         34.29 ns/iter  29,162,965.0   (31.68 ns … 37.35 ns) 35.16 ns 36.67 ns 36.67 ns
Deno.UnsafePointerView#getInt16          34.17 ns/iter  29,263,351.5   (33.04 ns … 41.08 ns) 34.41 ns 36.16 ns 36.49 ns
Deno.UnsafePointerView#getUint32         33.79 ns/iter  29,594,317.6   (31.67 ns … 54.37 ns) 34.48 ns 36.89 ns 37.03 ns
Deno.UnsafePointerView#getInt32          33.67 ns/iter  29,701,523.0    (33.1 ns … 49.85 ns) 33.87 ns 35.47 ns 36.3 ns
Deno.UnsafePointerView#getBigUint64      41.67 ns/iter  23,999,869.6      (39.89 ns … 51 ns) 42.39 ns 43.72 ns 43.84 ns
Deno.UnsafePointerView#getBigInt64       33.69 ns/iter  29,684,834.6     (33.1 ns … 39.1 ns) 33.82 ns 34.77 ns 34.8 ns
Deno.UnsafePointerView#getFloat32        41.02 ns/iter  24,376,301.2   (39.72 ns … 75.63 ns) 41.03 ns 43.78 ns 62.43 ns
Deno.UnsafePointerView#getFloat64        41.67 ns/iter  24,000,063.4   (38.64 ns … 68.07 ns) 41.93 ns 47.49 ns 62.47 ns

@bartlomieju
Copy link
Member

@aapoalas I'll review once we land #23981

Copy link
Member

@devsnek devsnek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit.

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aapoalas please rebase

@aapoalas
Copy link
Collaborator Author

Will do once I get home

@aapoalas aapoalas force-pushed the feat/ffi-breaking-turbocall-f64-representation branch from 6f97eb3 to 2bf0fbb Compare May 29, 2024 14:51
@littledivy littledivy merged commit d67ee9a into denoland:main May 30, 2024
17 checks passed
@littledivy littledivy deleted the feat/ffi-breaking-turbocall-f64-representation branch May 30, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants