[ruby-core:96709] [Ruby master Misc#16487] Potential for SIMD usage in ruby-core

[email protected] Wed, 08 Jan 2020 10:58:24 +0000 (UTC)
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-83697.20200108105823.7b58d85b242cd1ab@ruby-lang.org>
Issue #16487 has been updated by jaruga (Jun Aruga).


> The downside of SIMD instructions is that they are not universally available.
So it means maintaining several versions of the same code, and switching them either statically or dynamically.

There is a library simde: SIMD Everywhere to improve the universal availability.
https://github.com/nemequ/simde
Right now a person is working for this repository to create the deb package in Debian.

As a example, bowtie2 is using it on aarch64 case where SIMD is not available.
https://github.com/BenLangmead/bowtie2/tree/master/third_party



----------------------------------------
Misc #16487: Potential for SIMD usage in ruby-core
https://bugs.ruby-lang.org/issues/16487#change-83697

* Author: byroot (Jean Boussier)
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
### Context

There are several ruby core methods that could be optimized with the use of SIMD instructions.

I experimented a bit on `coderange_scan` https://github.com/Shopify/ruby/pull/2, and Pavel Rosický experimented on `String#strip` https://github.com/ruby/ruby/pull/2815.

### Problem

The downside of SIMD instructions is that they are not universally available.
So it means maintaining several versions of the same code, and switching them either statically or dynamically.

And since most Ruby users use precompiled binaries from repositories and such, it would need to be dynamic if we want most users to benefit from it.

So it's not exactly "free speed", as it means a complexified codebase.

### Question

So the question is to know wether ruby-core is open to patches using SIMD instructions ? And if so under which conditions.

cc @shyouhei





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>