[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generalized-Arrays egg v1.0.1
From: |
felix . winkelmann |
Subject: |
Re: Generalized-Arrays egg v1.0.1 |
Date: |
Tue, 06 Feb 2024 17:04:29 +0100 |
> Aha, so as long as something is wrapped we don't see the same kind of
> inlining.
Correct.
> So what would this look like? I can see fx+ above, which uses
> `chicken:fx+` (prefixed, 2-arity) and foldr to accomplish its multi-arg
> case. Is adding `(inline-file)` to the srfi-143.egg enough for this? I
> suspect partly that the foldr and `(fx+ . args)` form in general is
> going to be hard to optimize out, but perhaps a case-lambda is faster?
If we make the operations variadic, the compiler can always
optimize (fx+ ...) into nested calls to dyadic lower-level primitives,
but this applies only to optimizations that the compiler knows about.
For user-defined inlinings, this is currently not possible.
> Thanks for the really informed reply Felix, this was very helpful in
> understanding what's happening with SRFI-143. I can hopefully start
> crafting a patch for this now.
No problem, you are very welcome.
cheers,
felix