Earlopain 48a73303e4 [ruby/prism] Optimize Prism::Source#find_line
This is more concise and ruby does a better job performance-wise.

This used to be `bsearch_index` already but 6d8358c083 changed it.
https://github.com/ruby/prism/pull/1733#discussion_r1373702087 said:
> Yeah the edge case was that the value matched an element exactly

But surely there would be a test to show this behaviour?

Gets called as part of pretty-printing nodes.
Further reduces the time for `SnapshotsTest` by ~16% for me.

https://github.com/ruby/prism/commit/f448e2b995
2025-11-29 19:01:11 +00:00
..
2025-11-12 21:48:07 +00:00
2025-11-13 16:01:15 +00:00
2025-10-31 00:14:23 +00:00
2025-10-29 07:34:58 +00:00
2025-11-10 09:25:45 +00:00
2025-10-29 06:50:19 +00:00
2025-11-10 10:03:07 +00:00