> 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.
Pushed. 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... > > 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 lfa2 it would definitely make sense. Maybe you can add a ticket for that? > - 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. Would be an option. > - 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. felix _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
