[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of srfi
From: |
Peter Bex |
Subject: |
[Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of srfi-4 accessors, length checks and predicates |
Date: |
Mon, 8 Apr 2019 22:04:20 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Hi all,
Here's a reasonably straightforward patch to make XXXvector-ref,
XXXvector-set!, XXXvector-length and XXXvector? inlineable, as
per #757. The predicate wasn't really part of the ticket but it
seemed like a good thing to add (we can use it instead of copy/pasting
all the checks inside the accessors).
It's a bit ugly because it adds quite a large swath of code to
runtime.c, but it should definitely speed things up.
Some notes/questions:
- Could these be added to lfa2 for predicate extinguishing and
perhaps unboxing accessors too? How would that work?
- Should we move the constructors to runtime.c as well, like
we have C_vector and C_a_i_vector? I think it's probably
overkill, but who knows.
- Should we add a special case rewrite to c-platform.scm like
we have rewrite-make-vector? Same here, probably total
overkill.
Cheers,
Peter
0001-Add-inlined-srfi-4-accessors-predicates-and-length-p.patch
Description: Text Data
signature.asc
Description: PGP signature
- [Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of srfi-4 accessors, length checks and predicates,
Peter Bex <=