summaryrefslogtreecommitdiff
path: root/yjit/bindgen/src
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2024-02-13 08:20:27 -0800
committerGitHub <noreply@github.com>2024-02-13 16:20:27 +0000
commitc35fea8509551aefe257986c937ea7147f436bdf (patch)
tree1c7cfb948db049aedffa0305e25e14d56d21f314 /yjit/bindgen/src
parenta71d1ed83875600c174e66a8ace18e0ad451958a (diff)
Specialize String#byteslice(a, b) (#9939)
* Specialize String#byteslice(a, b) This adds a specialization for String#byteslice when there are two parameters. This makes our protobuf parser go from 5.84x slower to 5.33x slower ``` Comparison: decode upstream (53738 bytes): 7228.5 i/s decode protobuff (53738 bytes): 1236.8 i/s - 5.84x slower Comparison: decode upstream (53738 bytes): 7024.8 i/s decode protobuff (53738 bytes): 1318.5 i/s - 5.33x slower ``` * Update yjit/src/codegen.rs --------- Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Diffstat (limited to 'yjit/bindgen/src')
-rw-r--r--yjit/bindgen/src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs
index 92c91c4ec6..0824e80cd0 100644
--- a/yjit/bindgen/src/main.rs
+++ b/yjit/bindgen/src/main.rs
@@ -224,6 +224,7 @@ fn main() {
.allowlist_function("rb_ec_str_resurrect")
.allowlist_function("rb_str_concat_literals")
.allowlist_function("rb_obj_as_string_result")
+ .allowlist_function("rb_str_byte_substr")
// From include/ruby/internal/intern/parse.h
.allowlist_function("rb_backref_get")