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


_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to