diff options
author | Randy Stauner <[email protected]> | 2024-04-29 11:32:07 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-29 14:32:07 -0400 |
commit | 845f2db1360032a0506c5d5a8570f5c73a2588a3 (patch) | |
tree | 432f5eb3cad7d141bf8946a69ce880996331bc5b /yjit/bindgen/src | |
parent | e3bfd25bd2202a172d7709e9a2f7b65b523a132d (diff) |
YJIT: Add specialized codegen function for `TrueClass#===` (#10640)
* YJIT: Add specialized codegen function for `TrueClass#===`
TrueClass#=== is currently number 10 in the most frequent C calls list of the lobsters benchmark.
```
require "benchmark/ips"
def wrap
true === true
true === false
true === :x
end
Benchmark.ips do |x|
x.report(:wrap) do
wrap
end
end
```
```
before
Warming up --------------------------------------
wrap 1.791M i/100ms
Calculating -------------------------------------
wrap 17.806M (± 1.0%) i/s - 89.544M in 5.029363s
after
Warming up --------------------------------------
wrap 4.024M i/100ms
Calculating -------------------------------------
wrap 40.149M (± 1.1%) i/s - 201.223M in 5.012527s
```
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Co-authored-by: Takashi Kokubun (k0kubun) <[email protected]>
Co-authored-by: Kevin Menard <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
* Fix the new test for RJIT
---------
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Co-authored-by: Takashi Kokubun (k0kubun) <[email protected]>
Co-authored-by: Kevin Menard <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Diffstat (limited to 'yjit/bindgen/src')
-rw-r--r-- | yjit/bindgen/src/main.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index 953ab0ac42..a7473c1bf6 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -380,6 +380,7 @@ fn main() { // From internal/object.h .allowlist_function("rb_class_allocate_instance") + .allowlist_function("rb_obj_equal") // From gc.h and internal/gc.h .allowlist_function("rb_obj_info") |