unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* C based vector and bytevector copy
@ 2022-02-03  7:08 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2022-02-03  7:08 UTC (permalink / raw)
  To: guile-devel, Guile User

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-03  7:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  7:08 C based vector and bytevector copy Stefan Israelsson Tampe

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).