General

Profile

ahorek (Pavel Rosický)

  • Login: ahorek
  • Registered on: 01/26/2017
  • Last sign in: 01/06/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 15 16

Activity

08/29/2025

01:12 PM Ruby Feature #20163: Introduce #bit_count method on Integer
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ý)

11/05/2023

07:35 PM Ruby Bug #19989: Fix refinement refine performance
> 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ý)

09/27/2023

05:09 PM Ruby Bug #19875: Ruby 3.0 -> 3.1 Performance regression in String#count
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ý)

09/20/2023

12:28 AM Ruby Bug #19875: Ruby 3.0 -> 3.1 Performance regression in String#count
@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ý)

03/21/2022

12:51 AM Ruby Bug #18651 (Closed): oob access in CP51932 -> CP50220 transcoder
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ý)

12/11/2021

02:07 PM Ruby Feature #14794: Primitive arrays (Ruby 3x3)
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ý)

08/11/2020

02:40 PM Ruby Bug #17114: Float is not properly kept as integer when integer is added without space
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ý)

07/29/2020

01:57 PM Ruby Bug #17057 (Closed): CGI different behaviour with C vs Ruby version
```
irb(main):001:0> require 'cgi' # don't load a native extension
irb(main):002:0> CGI.unescapeHTML("\xFF&")
=> ArgumentError (invalid byte sequence in UTF-8)
```
there's a fix on upstream https://github.com/ruby/cgi/pull/2
ahorek (Pavel Rosický)

01/10/2020

02:12 PM Ruby Misc #16487: Potential for SIMD usage in ruby-core
> 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ý)
11:35 AM Ruby Misc #16487: Potential for SIMD usage in ruby-core
> 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ý)

Also available in: Atom