x64 and ARM have specialized CPU instructions https://godbolt.org/z/xvGvzsvd9 and Ruby already uses it internally, for instance https://github.com/ruby/ruby/blob/dc555a48e750b4d50eb7a7000ca1bfb927fa9459/string.c#L2209 That said, ...ahorek (Pavel Rosický)
> By fixing this, we could improve refinement performance and encourage more adoption since refinements are a powerful way to make small adjustments to the language without resorting to more complicated solutions -- or worse -- using mon...ahorek (Pavel Rosický)
I think if the platform support is sufficient, there are multiple places where this feature could be beneficial. Even without explicit SIMD code, some existing C code could be autovectorized by the compiler itself for the AVX2 target whi...ahorek (Pavel Rosický)
@Freaky here's an alternative approach https://godbolt.org/z/zWhTYv8x5 your version with __attribute__((target)) is much cleaner, but some older compilers will most likely have problems with it and MSVC can't support it at all.ahorek (Pavel Rosický)
Hello, while working on a port of Japanese transcoder, I found a potential out of bounds access: https://github.com/ruby/ruby/blob/73541cdc2f192f856ab19781472cdccbf9c21f71/enc/trans/iso2022.trans#L465 ```tbl0208``` has 126 chars in...ahorek (Pavel Rosický)
thanks for your interest @mame! btw I found a bug in pypy which leads to a slow performance in this benchmark which is now fixed > performs an experiment with some real-world applications like Rails based on experiments on TruffleRuby...ahorek (Pavel Rosický)
Hi, it's not a bug. +-1 is a precision argument. ``` irb> 12.34.floor(-1) => 10 irb> 12.34.floor(+1) => 12.3 ``` take a look at the documentation, it describes this exact behavior well. https://ruby-doc.org/core-2.7.1/Float....ahorek (Pavel Rosický)
> use __target__ attributes thanks for the links, very helpful > ... yes, sometimes it's possible and it would be great, but 1/ it requires a lot of effort to convince the compiler to do what you want. It's basically about good da...ahorek (Pavel Rosický)
> Could you extend on that ? I'm not sure I understand what you mean here. for maximum portability, you should use `-march=x86-64` in this case, even if your current CPU supports AVX, the compiler can't use AVX instructions for a r...ahorek (Pavel Rosický)