From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 0771C1F463 for ; Wed, 8 Jan 2020 10:58:40 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 9234212099D; Wed, 8 Jan 2020 19:58:22 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 1068812097D for ; Wed, 8 Jan 2020 19:58:19 +0900 (JST) Received: by filterdrecv-p3mdw1-56c97568b5-q2ks7 with SMTP id filterdrecv-p3mdw1-56c97568b5-q2ks7-18-5E15B5D0-C 2020-01-08 10:58:24.1023176 +0000 UTC m=+1937717.234197477 Received: from herokuapp.com (unknown [3.95.205.234]) by ismtpd0039p1iad1.sendgrid.net (SG) with ESMTP id sWvKeGKeSd2_7Rj31fVofA for ; Wed, 08 Jan 2020 10:58:24.037 +0000 (UTC) Date: Wed, 08 Jan 2020 10:58:24 +0000 (UTC) From: jaruga@redhat.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72372 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 16487 X-Redmine-Issue-Author: byroot X-Redmine-Sender: jaruga X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?yXpFNqRr1dEY0snEQ6vUpjORBmm3WV3CBkaa8tOjsKl=2FioVGmSSWd2Gl+PZhTC?= =?us-ascii?Q?NO3hcT4k5BUwPYMqst2pRagNIwY9Hwhq2uqdR5B?= =?us-ascii?Q?x5Mq9MZHJjDPWVbWneLfkAXpHnyWqSa9DqvT3hV?= =?us-ascii?Q?BzuRan=2Fv3H5yu8ndJtksmH52DIFbKE3pPyrjP8M?= =?us-ascii?Q?Rh7erMCMgKGrkveWGZ4p9fltGDSpR6A4c=2FE+rem?= =?us-ascii?Q?E=2FZAauXpYl8tiQoBY=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96709 Subject: [ruby-core:96709] [Ruby master Misc#16487] Potential for SIMD usage in ruby-core X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16487 has been updated by jaruga (Jun Aruga). > The downside of SIMD instructions is that they are not universally availa= ble. So it means maintaining several versions of the same code, and switching th= em either statically or dynamically. There is a library simde: SIMD Everywhere to improve the universal availabi= lity. 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 availab= le. 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/pu= ll/2, and Pavel Rosick=FD experimented on `String#strip` https://github.com= /ruby/ruby/pull/2815. ### Problem The downside of SIMD instructions is that they are not universally availabl= e. So it means maintaining several versions of the same code, and switching th= em either statically or dynamically. And since most Ruby users use precompiled binaries from repositories and su= ch, 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 i= nstructions ? And if so under which conditions. cc @shyouhei -- = https://bugs.ruby-lang.org/ Unsubscribe: