unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: guile-devel <guile-devel@gnu.org>, Guile User <guile-user@gnu.org>
Subject: C based vector and bytevector copy
Date: Thu, 3 Feb 2022 08:08:46 +0100	[thread overview]
Message-ID: <CAGua6m2hb+WzY_GbRo-f=q=8aQ=PmbJwTSwnR9RmikCRevgC2Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]

Hi all,

I have streamlined my c-based superfast vector copy lib in
stis-supervectors to get a self contained c-file that generates
*vector-copy! that handles all types of bytevectors and SCM vectors, can
have different directions can have different endianes and can have
arbitrary intervals like pythons [1:2:3]. Only the reasonable safe variants
are possible e.g. not signed to unsigned and not u64 to u32. But we do
doubles -> float (although it can be dangerous). Takes about 10s with O2 to
compile.


We may wonder why we need a C based version of this. Well for one thing it
can benchmark guiles' own routines. And all these copy routines can be made
quite fast on contemporary computers (memcpy speed).

If people are interested in including it in guile, I'll be happy to sign
over the copyright to FSF, else it is a nice lib to play with. If there is
interest I can make a small project to host it outside the stis-supervector
lib where a scm interface at a higher level can be made.

Link:
https://gitlab.com/tampe/stis-supervectors/-/blob/main/src/vector-copy.c

Regards
Stefan

[-- Attachment #2: Type: text/html, Size: 1408 bytes --]

                 reply	other threads:[~2022-02-03  7:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-all from there: mbox

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to='CAGua6m2hb+WzY_GbRo-f=q=8aQ=PmbJwTSwnR9RmikCRevgC2Q@mail.gmail.com' \
    --to=stefan.itampe@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.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).