Skip to content

array

Benchmarks of ordito.array against every library that computes the same thing. Each chart shows the time of every library relative to ordito on CUDA (1x, in green): a longer bar took longer. The table under each chart lists every input the function was measured on. See Benchmarks for how to read and reproduce these numbers.

Measured on GPU: NVIDIA GeForce RTX 5090 · CPU: Intel Xeon w7-2495X

Summary

0.1x1x10x100xordito (CUDA): the reference, 1xordito (CUDA)1xPyTorch3D (CUDA): 1.3x ordito's time, geometric mean over 1 functions; slower than ordito in 1PyTorch3D (CUDA)1.3x (1)trimesh: 7.4x ordito's time, geometric mean over 2 functions; slower than ordito in 2trimesh7.4x (2)NumPy: 18x ordito's time, geometric mean over 16 functions; slower than ordito in 15NumPy18x (16)SciPy: 38x ordito's time, geometric mean over 2 functions; slower than ordito in 2SciPy38x (2)
Time relative to ordito (CUDA), geometric mean over the array functions both implement; in parentheses, the number of functions. Log scale. Runs stopped at the time limit are left out.
Values
Library Time relative to ordito Functions compared ordito faster in
PyTorch3D (CUDA) 1.3x 1 1
trimesh 7.4x 2 2
NumPy 18x 16 15
SciPy 38x 2 2

concatenate_arrays

0.1x1x10x100xordito (CUDA): 31.7 µs, 1x ordito's timeordito (CUDA)1x · 31.7 µsPyTorch3D (CUDA): 242.6 µs, 7.7x ordito's timePyTorch3D (CUDA)7.7x · 242.6 µsNumPy: 585.8 µs, 18x ordito's timeNumPy18x · 585.8 µs
dragon (871 414 faces) · n_segments=4 · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 31.7 µs 1x
PyTorch3D (CUDA) 242.6 µs 7.7x
NumPy 585.8 µs 18x
All inputs
Input ordito (CUDA) NumPy PyTorch3D (CUDA)
sphere_small n_segments=4 33.7 µs
sphere_small n_segments=256 167.6 µs
bunny_decimated n_segments=4 27.9 µs 4.9 µs 36.5 µs
bunny_decimated n_segments=256 157.8 µs 22.4 µs 28.9 µs
bunny n_segments=4 35.4 µs 29.5 µs 41.6 µs
bunny n_segments=256 166.6 µs 60.4 µs 27.4 µs
dragon n_segments=4 31.7 µs 585.8 µs 242.6 µs
dragon n_segments=256 147.4 µs 618.6 µs 29.1 µs
happy_buddha n_segments=4 30.9 µs 738.1 µs 297.3 µs
happy_buddha n_segments=256 158.9 µs 816.1 µs 30.7 µs
lucy n_segments=4 455.2 µs 63.71 ms 15.34 ms
lucy n_segments=256 624.9 µs 63.51 ms 1.35 ms

pack_1d_arrays

0.1x1x10xordito (CUDA): 59.6 µs, 1x ordito's timeordito (CUDA)1x · 59.6 µsNumPy: 587.6 µs, 9.9x ordito's timeNumPy9.9x · 587.6 µs
dragon (871 414 faces) · n_segments=4 · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 59.6 µs 1x
NumPy 587.6 µs 9.9x
All inputs
Input ordito (CUDA) NumPy
sphere_small n_segments=4 41.9 µs
sphere_small n_segments=256 242.0 µs
bunny_decimated n_segments=4 54.9 µs 7.2 µs
bunny_decimated n_segments=256 222.3 µs 35.3 µs
bunny n_segments=4 57.0 µs 31.7 µs
bunny n_segments=256 303.1 µs 74.4 µs
dragon n_segments=4 59.6 µs 587.6 µs
dragon n_segments=256 191.1 µs 672.3 µs
happy_buddha n_segments=4 57.9 µs 779.2 µs
happy_buddha n_segments=256 380.4 µs 822.9 µs
lucy n_segments=4 468.1 µs 63.71 ms
lucy n_segments=256 703.6 µs 63.48 ms

split_array

0.001x0.01x0.1x1xNumPy: 3.6 µs, 0.06x ordito's timeNumPy0.06x · 3.6 µsordito (CUDA): 56.7 µs, 1x ordito's timeordito (CUDA)1x · 56.7 µs
dragon (871 414 faces) · copy=False · n_segments=4 · time relative to ordito, log scale
Values
Library Median Relative to ordito
NumPy 3.6 µs 0.06x
ordito (CUDA) 56.7 µs 1x
All inputs
Input ordito (CUDA) NumPy
sphere_small copy=False n_segments=4 55.2 µs
sphere_small copy=False n_segments=256 118.5 µs
sphere_small copy=True n_segments=4 138.1 µs
sphere_small copy=True n_segments=256 957.6 µs
bunny_decimated copy=False n_segments=4 64.9 µs 3.6 µs
bunny_decimated copy=False n_segments=256 104.8 µs 109.2 µs
bunny_decimated copy=True n_segments=4 119.5 µs 9.4 µs
bunny_decimated copy=True n_segments=256 850.1 µs 185.1 µs
bunny copy=False n_segments=4 60.9 µs 3.7 µs
bunny copy=False n_segments=256 126.2 µs 107.3 µs
bunny copy=True n_segments=4 94.2 µs 34.0 µs
bunny copy=True n_segments=256 893.0 µs 233.1 µs
dragon copy=False n_segments=4 56.7 µs 3.6 µs
dragon copy=False n_segments=256 109.8 µs 106.6 µs
dragon copy=True n_segments=4 93.4 µs 629.3 µs
dragon copy=True n_segments=256 915.7 µs 829.2 µs
happy_buddha copy=False n_segments=4 54.2 µs 4.1 µs
happy_buddha copy=False n_segments=256 177.2 µs 107.8 µs
happy_buddha copy=True n_segments=4 114.1 µs 726.5 µs
happy_buddha copy=True n_segments=256 976.5 µs 1.01 ms
lucy copy=False n_segments=4 74.9 µs 3.5 µs
lucy copy=False n_segments=256 126.2 µs 107.9 µs
lucy copy=True n_segments=4 575.2 µs 64.14 ms
lucy copy=True n_segments=256 1.57 ms 125.71 ms

sort_and_argsort

0.1x1x10x100x1000x10000xordito (CUDA): 172.7 µs, 1x ordito's timeordito (CUDA)1x · 172.7 µsNumPy: 232.12 ms, 1344x ordito's timeNumPy1344x · 232.12 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 172.7 µs 1x
NumPy 232.12 ms 1344x
All inputs
Input ordito (CUDA) NumPy
sphere_small 83.3 µs
bunny_decimated 79.4 µs 2.91 ms
bunny 85.0 µs 13.77 ms
dragon 172.7 µs 232.12 ms
happy_buddha 207.1 µs 290.08 ms
lucy 4.59 ms 11.655 s

flatnonzero

0.1x1x10x100xordito (CUDA): 48.6 µs, 1x ordito's timeordito (CUDA)1x · 48.6 µsNumPy: 1.36 ms, 28x ordito's timeNumPy28x · 1.36 ms
dragon (871 414 faces) · selectivity=0.5 · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 48.6 µs 1x
NumPy 1.36 ms 28x
All inputs
Input ordito (CUDA) NumPy
sphere_small selectivity=0.5 53.0 µs
sphere_small selectivity=0.01 44.8 µs
bunny_decimated selectivity=0.5 42.1 µs 26.8 µs
bunny_decimated selectivity=0.01 43.6 µs 8.0 µs
bunny selectivity=0.5 63.2 µs 107.8 µs
bunny selectivity=0.01 53.4 µs 42.7 µs
dragon selectivity=0.5 48.6 µs 1.36 ms
dragon selectivity=0.01 49.0 µs 704.4 µs
happy_buddha selectivity=0.5 63.2 µs 1.69 ms
happy_buddha selectivity=0.01 59.4 µs 889.8 µs
lucy selectivity=0.5 2.15 ms 80.59 ms
lucy selectivity=0.01 1.90 ms 26.97 ms

gather

0.1x1x10x100xordito (CUDA): 59.6 µs, 1x ordito's timeordito (CUDA)1x · 59.6 µsNumPy: 2.78 ms, 47x ordito's timeNumPy47x · 2.78 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 59.6 µs 1x
NumPy 2.78 ms 47x
All inputs
Input ordito (CUDA) NumPy
sphere_small 35.1 µs
bunny_decimated 49.5 µs 32.8 µs
bunny 35.5 µs 140.3 µs
dragon 59.6 µs 2.78 ms
happy_buddha 65.5 µs 3.27 ms
lucy 847.0 µs 306.08 ms

index_bound

0.1x1x10x100xordito (CUDA): 52.8 µs, 1x ordito's timeordito (CUDA)1x · 52.8 µstrimesh: 574.2 µs, 11x ordito's timetrimesh11x · 574.2 µs
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 52.8 µs 1x
trimesh 574.2 µs 11x
All inputs
Input ordito (CUDA) trimesh
sphere_small 59.2 µs
bunny_decimated 50.9 µs 4.3 µs
bunny 55.5 µs 19.4 µs
dragon 52.8 µs 574.2 µs
happy_buddha 68.6 µs 716.2 µs
lucy 372.8 µs 38.34 ms

arange

0.1x1x10x100xordito (CUDA): 20.1 µs, 1x ordito's timeordito (CUDA)1x · 20.1 µsNumPy: 431.1 µs, 21x ordito's timeNumPy21x · 431.1 µs
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 20.1 µs 1x
NumPy 431.1 µs 21x
All inputs
Input ordito (CUDA) NumPy
sphere_small 25.4 µs
bunny_decimated 22.4 µs 12.1 µs
bunny 16.8 µs 40.6 µs
dragon 20.1 µs 431.1 µs
happy_buddha 28.1 µs 555.9 µs
lucy 228.8 µs 46.63 ms

allclose

0.1x1x10x100xordito (CUDA): 35.0 µs, 1x ordito's timeordito (CUDA)1x · 35.0 µsNumPy: 2.86 ms, 82x ordito's timeNumPy82x · 2.86 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 35.0 µs 1x
NumPy 2.86 ms 82x
All inputs
Input ordito (CUDA) NumPy
sphere_small 38.4 µs
bunny_decimated 37.0 µs 43.4 µs
bunny 43.9 µs 154.4 µs
dragon 35.0 µs 2.86 ms
happy_buddha 55.2 µs 3.63 ms
lucy 239.6 µs 236.14 ms

sort_rows

0.1x1x10x100x1000xordito (CUDA): 23.8 µs, 1x ordito's timeordito (CUDA)1x · 23.8 µsNumPy: 16.30 ms, 684x ordito's timeNumPy684x · 16.30 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 23.8 µs 1x
NumPy 16.30 ms 684x
All inputs
Input ordito (CUDA) NumPy
sphere_small 13.3 µs
bunny_decimated 16.3 µs 352.6 µs
bunny 11.6 µs 1.31 ms
dragon 23.8 µs 16.30 ms
happy_buddha 29.4 µs 20.26 ms
lucy 1.22 ms 541.85 ms

block_diag

0.1x1x10x100x1000xordito (CUDA): 238.0 µs, 1x ordito's timeordito (CUDA)1x · 238.0 µsSciPy: 40.09 ms, 168x ordito's timeSciPy168x · 40.09 ms
sphere_large (327 680 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 238.0 µs 1x
SciPy 40.09 ms 168x
All inputs
Input ordito (CUDA) SciPy
sphere_small 129.1 µs 548.4 µs
sphere_med 153.9 µs 7.33 ms
sphere_large 238.0 µs 40.09 ms

csr_from_keys

0.1x1x10x100xordito (CUDA): 347.3 µs, 1x ordito's timeordito (CUDA)1x · 347.3 µsSciPy: 32.34 ms, 93x ordito's timeSciPy93x · 32.34 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 347.3 µs 1x
SciPy 32.34 ms 93x
All inputs
Input ordito (CUDA) SciPy
sphere_small 79.9 µs
bunny_decimated 96.4 µs 757.8 µs
bunny 94.4 µs 2.38 ms
dragon 347.3 µs 32.34 ms
happy_buddha 423.8 µs 44.39 ms
lucy 14.16 ms 1.145 s

index_sparse

0.1x1x10x100xordito (CUDA): 407.8 µs, 1x ordito's timeordito (CUDA)1x · 407.8 µstrimesh: 22.12 ms, 54x ordito's timetrimesh54x · 22.12 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 407.8 µs 1x
trimesh 22.12 ms 54x
All inputs
Input ordito (CUDA) trimesh
sphere_small 139.6 µs
bunny_decimated 196.2 µs 321.5 µs
bunny 180.0 µs 1.45 ms
dragon 407.8 µs 22.12 ms
happy_buddha 581.1 µs 26.91 ms
lucy 22.30 ms 1.008 s

isin

0.1x1x10x100x1000xordito (CUDA): 91.0 µs, 1x ordito's timeordito (CUDA)1x · 91.0 µsNumPy: 12.96 ms, 143x ordito's timeNumPy143x · 12.96 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 91.0 µs 1x
NumPy 12.96 ms 143x
All inputs
Input ordito (CUDA) NumPy
sphere_small 81.8 µs
bunny_decimated 93.1 µs 167.2 µs
bunny 98.5 µs 726.0 µs
dragon 91.0 µs 12.96 ms
happy_buddha 132.5 µs 14.34 ms
lucy 1.04 ms 608.41 ms

flatnonzero_in_place

0.1x1x10x100x1000xordito (CUDA): 43.9 µs, 1x ordito's timeordito (CUDA)1x · 43.9 µsNumPy: 12.39 ms, 282x ordito's timeNumPy282x · 12.39 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 43.9 µs 1x
NumPy 12.39 ms 282x
All inputs
Input ordito (CUDA) NumPy
sphere_small 35.7 µs
bunny_decimated 47.0 µs 350.9 µs
bunny 36.1 µs 963.1 µs
dragon 43.9 µs 12.39 ms
happy_buddha 49.2 µs 15.09 ms
lucy 1.17 ms 441.24 ms

compress_in_place

0.1x1x10x100xordito (CUDA): 47.4 µs, 1x ordito's timeordito (CUDA)1x · 47.4 µsNumPy: 755.7 µs, 16x ordito's timeNumPy16x · 755.7 µs
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 47.4 µs 1x
NumPy 755.7 µs 16x
All inputs
Input ordito (CUDA) NumPy
sphere_small 41.5 µs
bunny_decimated 36.8 µs 23.4 µs
bunny 48.0 µs 99.4 µs
dragon 47.4 µs 755.7 µs
happy_buddha 45.6 µs 1.02 ms
lucy 275.6 µs 46.00 ms

astype

0.1x1x10x100xordito (CUDA): 26.0 µs, 1x ordito's timeordito (CUDA)1x · 26.0 µsNumPy: 608.5 µs, 23x ordito's timeNumPy23x · 608.5 µs
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 26.0 µs 1x
NumPy 608.5 µs 23x
All inputs
Input ordito (CUDA) NumPy
sphere_small 18.4 µs
bunny_decimated 25.6 µs 7.3 µs
bunny 16.3 µs 22.5 µs
dragon 26.0 µs 608.5 µs
happy_buddha 31.8 µs 782.8 µs
lucy 458.1 µs 67.01 ms

copyto

0.1x1x10x100xordito (CUDA): 17.8 µs, 1x ordito's timeordito (CUDA)1x · 17.8 µsNumPy: 552.5 µs, 31x ordito's timeNumPy31x · 552.5 µs
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 17.8 µs 1x
NumPy 552.5 µs 31x
All inputs
Input ordito (CUDA) NumPy
sphere_small 15.6 µs
bunny_decimated 12.5 µs 7.0 µs
bunny 15.3 µs 22.4 µs
dragon 17.8 µs 552.5 µs
happy_buddha 27.4 µs 715.3 µs
lucy 451.5 µs 43.88 ms

mask_to_compact_ranks

0.1x1x10x100x1000xordito (CUDA): 50.5 µs, 1x ordito's timeordito (CUDA)1x · 50.5 µsNumPy: 8.12 ms, 161x ordito's timeNumPy161x · 8.12 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 50.5 µs 1x
NumPy 8.12 ms 161x
All inputs
Input ordito (CUDA) NumPy
sphere_small 58.2 µs
bunny_decimated 55.8 µs 204.9 µs
bunny 46.3 µs 620.3 µs
dragon 50.5 µs 8.12 ms
happy_buddha 62.8 µs 11.52 ms
lucy 764.0 µs 495.04 ms

counts_to_offsets

0.1x1x10x100xordito (CUDA): 28.1 µs, 1x ordito's timeordito (CUDA)1x · 28.1 µsNumPy: 2.76 ms, 98x ordito's timeNumPy98x · 2.76 ms
dragon (871 414 faces) · time relative to ordito, log scale
Values
Library Median Relative to ordito
ordito (CUDA) 28.1 µs 1x
NumPy 2.76 ms 98x
All inputs
Input ordito (CUDA) NumPy
sphere_small 44.5 µs
bunny_decimated 27.2 µs 64.0 µs
bunny 29.9 µs 163.9 µs
dragon 28.1 µs 2.76 ms
happy_buddha 30.8 µs 3.35 ms
lucy 214.8 µs 176.36 ms

Without a reference

No other library computes these, so they have no comparison. ordito (CUDA)'s median time on the largest input it was measured on:

Function Input ordito (CUDA)
arange_repeat lucy 226.8 µs
sort_pair_indices lucy 435.6 µs
sort_and_argsort_in_place lucy 3.91 ms
triplet_buffers — 14.8 µs
empty_square_bsr — 79.4 µs
bsr_from_csr sphere_small 24.1 µs
bsr_with_values sphere_med 20.6 µs
scalar_expansion sphere_large 121.6 µs
csr_key_buffers — 14.8 µs
csr_from_triplets lucy 19.01 ms
csr_from_coo_keys lucy 14.58 ms
csr_transpose lucy 19.43 ms
indices_to_mask lucy 155.3 µs
remap_indices lucy 522.4 µs
trim_to_count lucy 345.6 µs
bitcast_to_int lucy 464.0 µs
bitcast_from_int lucy 461.3 µs