[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of srfi-4 accessors, length checks and predicates |
Date: |
Thu, 11 Apr 2019 14:01:17 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Apr 11, 2019 at 01:52:13PM +0200, address@hidden wrote:
> > It's a bit ugly because it adds quite a large swath of code to
> > runtime.c, but it should definitely speed things up.
>
> Pushed.
Thanks!
> I wonder, though, whether all the accessor code
> wouldn't be more compact using some fat C macros. On the
> other hand that doesn't help readability much...
Yeah, I considered it but decided against it.
The function calls for checking the types could be made inlineable
if we export the symbols for the vector structure type tags. Not
sure if that's a great idea though!
> > Some notes/questions:
> >
> > - Could these be added to lfa2 for predicate extinguishing and
> > perhaps unboxing accessors too? How would that work?
>
> Unboxing works only for floating-point values, integers are
> not affected.
For f32vectors or f64vectors that could still work though.
> For lfa2 it would definitely make sense. Maybe you
> can add a ticket for that?
Here you go: https://bugs.call-cc.org/ticket/1606
> > - Should we add a special case rewrite to c-platform.scm like
> > we have rewrite-make-vector? Same here, probably total
> > overkill.
>
> I doubt all the (possible) performance improvement is
> worth the additional code + complexity.
Yeah, probably not. Later we may decide it's worth it, we can do it then.
Cheers,
Peter
signature.asc
Description: PGP signature