diff options
author | Eric Wong <bofh@yhbt.net> | 2024-03-24 00:19:17 +0000 |
---|---|---|
committer | Eric Wong <bofh@yhbt.net> | 2024-03-25 21:19:06 +0000 |
commit | 6d5ba2a10884303dc52df2557a08f3a87d1299b1 (patch) | |
tree | 1ab28f9557f3f226e5a7b62d21f8e087ab7dd53a /ext | |
parent | a36cf00dee5d7657bf95b66bd4559feaab010989 (diff) | |
download | raindrops-6d5ba2a10884303dc52df2557a08f3a87d1299b1.tar.gz |
OBJ_FREEZE before calling rb_hash_aset was actually preventing deduplication since Ruby 2.6. This introduces a performance regression for Ruby 2.5 users, but I expect the majority of users are on newer versions (I'm on 2.7, which is still ancient).
Diffstat (limited to 'ext')
-rw-r--r-- | ext/raindrops/linux_inet_diag.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_diag.c index e4050cb..799b4da 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -159,7 +159,6 @@ static int st_to_hash(st_data_t key, st_data_t value, VALUE hash) VALUE k = remove_scope_id((const char *)key); VALUE v = rb_listen_stats(stats); - OBJ_FREEZE(k); rb_hash_aset(hash, k, v); } return st_free_data(key, value, 0); @@ -174,7 +173,6 @@ static int st_AND_hash(st_data_t key, st_data_t value, VALUE hash) if (rb_hash_lookup(hash, k) == Qtrue) { VALUE v = rb_listen_stats(stats); - OBJ_FREEZE(k); rb_hash_aset(hash, k, v); } } |