diff options
author | Aaron Patterson <[email protected]> | 2024-02-13 08:20:27 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-13 16:20:27 +0000 |
commit | c35fea8509551aefe257986c937ea7147f436bdf (patch) | |
tree | 1c7cfb948db049aedffa0305e25e14d56d21f314 /yjit/src/cruby_bindings.inc.rs | |
parent | a71d1ed83875600c174e66a8ace18e0ad451958a (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 <[email protected]>
Diffstat (limited to 'yjit/src/cruby_bindings.inc.rs')
-rw-r--r-- | yjit/src/cruby_bindings.inc.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index f0644edaf3..54cd51b61e 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1049,6 +1049,7 @@ extern "C" { pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE; pub fn rb_ensure_iv_list_size(obj: VALUE, len: u32, newsize: u32); pub fn rb_vm_barrier(); + pub fn rb_str_byte_substr(str_: VALUE, beg: VALUE, len: VALUE) -> VALUE; pub fn rb_obj_as_string_result(str_: VALUE, obj: VALUE) -> VALUE; pub fn rb_str_concat_literals(num: usize, strary: *const VALUE) -> VALUE; pub fn rb_ec_str_resurrect(ec: *mut rb_execution_context_struct, str_: VALUE) -> VALUE; |