3 ms·
Interesting -- there are more rows (incl removed rows) in yours, because the first step in TFA halves the exponent. I guess it behaves more like binary searchin
by repsilat 6y ago
Interesting -- there are more rows (incl removed rows) in yours, because the first step in TFA halves the exponent. I guess it behaves more like binary searching the list of numbers than binary searching the range of numbers, which should be more efficient when the distribution is so heavily skewed.
- aardvark179 6y agoYes, in fact we have a special version of bsearch to handle all the float corner cases, and part of that deals with the max being infinity [0], we can check that and then just try the largest finite floating point number. [0] (https://github.com/oracle/truffleruby/blob/fde88d4019ab837162e15b65f58b0b3b2fd7f65c/src/main/ruby/truffleruby/core/range.rb#L117 https://github.com/oracle/truffleruby/blob/fde88d4019ab83716...)
- stingraycharles 6y agoJust a shout out that I really appreciate the work you guys are doing on GraalVM, especially the polyglot parts. It’s one of the more exciting parts of Graal that I don’t see too many people talk about, it’s usually all about native image and the JIT.