chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of


From: felix . winkelmann
Subject: Re: [Chicken-hackers] [PATCH] Fix #757 by adding inlineable versions of srfi-4 accessors, length checks and predicates
Date: Thu, 11 Apr 2019 17:57:11 +0200

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

Ok,

> 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!

Mm.... yeah.

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

We already do unboxing for the -ref variants, not for the
setters, though.

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

Well, it avoids a CPS call, which is always expensive. But this
rewriting code is painful...


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]