diff options
| author | Hartley McGuire <skipkayhil@gmail.com> | 2025-03-11 17:46:35 -0400 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-03-13 10:24:21 +0900 |
| commit | 8cc85dc00feef7fc7846ad15df2778f58716c169 (patch) | |
| tree | 05463a0e38ba43011b78a32965bb2a3e118f3091 /include/ruby/io | |
| parent | af76b7f4d9f791b8d20f567e0fa8a45488fa00b8 (diff) | |
[rubygems/rubygems] Remove array allocation from Candidate#<=>
In a large application I profiled allocations while running `bundle
update` and found that this method was ~60% of allocations while
resolving (and Candidate#<=> is almost half of the total runtime).
This commit removes the array allocation in Candidate#<=> (and similar
methods since the implementations are so simple). The array is always
the same two elements so they can just be compared directly.
https://github.com/rubygems/rubygems/commit/6a7c411ba7
Diffstat (limited to 'include/ruby/io')
0 files changed, 0 insertions, 0 deletions
