ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: jean.boussier@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:96757] [Ruby master Misc#16487] Potential for SIMD usage in ruby-core
Date: Fri, 10 Jan 2020 09:49:42 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-83748.20200110094941.563c3f303797ae58@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16487.20200108094829@ruby-lang.org

Issue #16487 has been updated by byroot (Jean Boussier).


> You can't use for example AVX instructions generated from a regular C code, even if your processor supports it. You have to recompile it for your platform, that's a pain of all C programs.

Could you extend on that ? I'm not sure I understand what you mean here.



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

* 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:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

  parent reply	other threads:[~2020-01-10  9:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-16487.20200108094829@ruby-lang.org>
2020-01-08  9:48 ` [ruby-core:96708] [Ruby master Misc#16487] Potential for SIMD usage un ruby-core jean.boussier
2020-01-08 10:58 ` [ruby-core:96709] [Ruby master Misc#16487] Potential for SIMD usage in ruby-core jaruga
2020-01-08 14:22 ` [ruby-core:96712] " jean.boussier
2020-01-08 16:13 ` [ruby-core:96715] " naruse
2020-01-09  5:29 ` [ruby-core:96726] " shyouhei
2020-01-09 12:34 ` [ruby-core:96736] " shevegen
2020-01-10  2:08 ` [ruby-core:96749] " mame
2020-01-10  5:09 ` [ruby-core:96753] " pdahorek
2020-01-10  7:36 ` [ruby-core:96756] " sam.saffron
2020-01-10  9:49 ` jean.boussier [this message]
2020-01-10 11:35 ` [ruby-core:96760] " pdahorek
2020-01-10 12:20 ` [ruby-core:96761] " jean.boussier
2020-01-10 12:29 ` [ruby-core:96762] " eregontp
2020-01-10 13:22 ` [ruby-core:96764] " jean.boussier
2020-01-10 14:12 ` [ruby-core:96765] " pdahorek
2020-01-10 14:36 ` [ruby-core:96766] " jean.boussier
2020-01-14  9:09 ` [ruby-core:96842] " naruse
2020-01-14  9:43 ` [ruby-core:96844] " jean.boussier
2020-01-16  5:25 ` [ruby-core:96883] " XrXr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-83748.20200110094941.563c3f303797ae58@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).