Skip to content

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Oct 23, 2025

unsafe.Pointer gets strings from []byte without allocating memory.
This is especially beneficial for operations that pass around strings.
Dolt already uses unsafe.Pointers in other places and this is within an immutable context.

@jycor
Copy link
Contributor Author

jycor commented Oct 23, 2025

#benchmark

@github-actions
Copy link

@coffeegoddd
Copy link
Contributor

@jycor DOLT

comparing_percentages
100.000000 to 100.000000
version result total
5e13e84 ok 5937471
version total_tests
5e13e84 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@jycor DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 66.84 66.84 0.0
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt 305fe1b 35.45 dolt 5e13e84 35.72 0.76

@coffeegoddd
Copy link
Contributor

@jycor DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.65 0.65 0.0
groupby_scan 19.29 18.95 -1.76
index_join 2.43 2.43 0.0
index_join_scan 1.37 1.37 0.0
index_scan 30.26 30.81 1.82
oltp_point_select 0.28 0.28 0.0
oltp_read_only 5.37 5.37 0.0
select_random_points 0.58 0.58 0.0
select_random_ranges 0.61 0.61 0.0
table_scan 33.12 32.53 -1.78
types_table_scan 130.13 127.81 -1.78
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.55 6.55 0.0
oltp_insert 3.25 3.25 0.0
oltp_read_write 11.87 11.87 0.0
oltp_update_index 3.3 3.3 0.0
oltp_update_non_index 3.25 3.25 0.0
oltp_write_only 6.43 6.43 0.0
types_delete_insert 7.04 7.04 0.0

@coffeegoddd
Copy link
Contributor

@jycor DOLT

comparing_percentages
100.000000 to 100.000000
version result total
f17fdcd ok 5937471
version total_tests
f17fdcd 5937471
correctness_percentage
100.0

Copy link
Contributor

@macneale4 macneale4 left a comment

Choose a reason for hiding this comment

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

LGTM

@jycor jycor merged commit 8d2b888 into main Oct 31, 2025
23 of 25 checks passed
@jycor jycor deleted the james/unsafe branch October 31, 2025 20:58
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.07 1.43
batching batch sql 10000 1 0.1 1.5
batching by line sql 10000 1 0.12 1.17
blob 1 blob 200000 1 0.89 4.31 4.34
blob 2 blobs 200000 1 0.91 4.63 4.6
blob no blob 200000 1 0.89 2.98 2.82
col type datetime 200000 1 0.83 2.82 2.84
col type varchar 200000 1 0.7 3.76 3.63
config width 2 cols 200000 1 0.81 3 2.89
config width 32 cols 200000 1 1.91 2.95 3.75
config width 8 cols 200000 1 0.99 2.93 3.64
pk type float 200000 1 0.82 2.83 2.85
pk type int 200000 1 0.78 2.91 2.97
pk type varchar 200000 1 1.47 1.93 1.9
row count 1.6mm 1600000 1 5.65 3.37 3.4
row count 400k 400000 1 1.46 3.16 3.22
row count 800k 800000 1 2.94 3.2 3.25
secondary index four index 200000 1 3.57 1.57 1.47
secondary index no secondary 200000 1 0.92 2.9 2.74
secondary index one index 200000 1 1.17 2.75 2.79
secondary index two index 200000 1 2.01 2.01 1.8
sorting shuffled 1mm 1000000 0 5.09 3.16 3.14
sorting sorted 1mm 1000000 1 5.17 3.12 3.14

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.17
dolt_blame_commit_filter system table 2.85
dolt_commit_ancestors_commit_filter system table 0.62
dolt_commits_commit_filter system table 1.09
dolt_diff_log_join_from_commit system table 2.86
dolt_diff_log_join_to_commit system table 2.88
dolt_diff_table_from_commit_filter system table 1.27
dolt_diff_table_to_commit_filter system table 1.17
dolt_diffs_commit_filter system table 1
dolt_history_commit_filter system table 1.4
dolt_log_commit_filter system table 1.09

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.84
adds_updates_deletes 60000 60000 60000 4.4
deletes_only 0 60000 0 2.13
updates_only 0 0 60000 2.77

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.06 1.67
batching batch sql 10000 1 0.07 2.14
batching by line sql 10000 1 0.08 1.63
blob 1 blob 200000 1 0.87 4.66 4.54
blob 2 blobs 200000 1 0.86 5.06 5.26
blob no blob 200000 1 0.88 3.09 2.91
col type datetime 200000 1 0.83 2.9 2.88
col type varchar 200000 1 0.66 4.17 4.26
config width 2 cols 200000 1 0.79 2.94 3.76
config width 32 cols 200000 1 1.94 2.94 2.79
config width 8 cols 200000 1 0.94 3.15 3.34
pk type float 200000 1 0.85 3.07 2.81
pk type int 200000 1 0.81 3.16 2.9
pk type varchar 200000 1 1.44 2.01 2.02
row count 1.6mm 1600000 1 5.73 3.37 3.4
row count 400k 400000 1 1.4 3.34 3.42
row count 800k 800000 1 2.76 3.49 3.49
secondary index four index 200000 1 3.67 1.55 1.5
secondary index no secondary 200000 1 0.87 3.09 2.95
secondary index one index 200000 1 1.1 3.02 3.07
secondary index two index 200000 1 2.02 2.04 1.79
sorting shuffled 1mm 1000000 0 5.29 3.19 3.29
sorting sorted 1mm 1000000 1 5.29 3.22 3.3

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.86
adds_updates_deletes 60000 60000 60000 4.94
deletes_only 0 60000 0 2.22
updates_only 0 0 60000 2.98

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.05 2
batching batch sql 10000 1 0.07 2
batching by line sql 10000 1 0.07 1.86
blob 1 blob 200000 1 0.89 4.34 4.33
blob 2 blobs 200000 1 0.89 4.72 4.78
blob no blob 200000 1 0.89 2.98 2.8
col type datetime 200000 1 0.78 3 3.01
col type varchar 200000 1 0.66 3.95 3.74
config width 2 cols 200000 1 0.78 2.95 4.05
config width 32 cols 200000 1 1.91 2.94 2.77
config width 8 cols 200000 1 0.96 3.04 3.2
pk type float 200000 1 0.82 3.18 2.83
pk type int 200000 1 0.88 2.65 2.63
pk type varchar 200000 1 1.52 2 1.82
row count 1.6mm 1600000 1 5.74 3.33 3.35
row count 400k 400000 1 1.41 3.3 3.32
row count 800k 800000 1 2.85 3.35 3.34
secondary index four index 200000 1 3.61 1.58 1.44
secondary index no secondary 200000 1 0.88 3 2.83
secondary index one index 200000 1 1.1 3 2.94
secondary index two index 200000 1 1.97 2.07 1.82
sorting shuffled 1mm 1000000 0 4.92 3.3 3.16
sorting sorted 1mm 1000000 1 5.01 3.23 3.13

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.16
dolt_blame_commit_filter system table 2.83
dolt_commit_ancestors_commit_filter system table 0.63
dolt_commits_commit_filter system table 1.05
dolt_diff_log_join_from_commit system table 2.79
dolt_diff_log_join_to_commit system table 2.79
dolt_diff_table_from_commit_filter system table 1.2
dolt_diff_table_to_commit_filter system table 1.23
dolt_diffs_commit_filter system table 1.03
dolt_history_commit_filter system table 1.52
dolt_log_commit_filter system table 1.05

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.86
adds_updates_deletes 60000 60000 60000 4.32
deletes_only 0 60000 0 2.14
updates_only 0 0 60000 2.85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants