Open mschauer opened 3 years ago
That would also allow to choose a list of functions from a list of functions in smap!
etc.
Interesting idea!
I thought of index building to speed it up yesterday, and what you suggest can also be the base of the index, if ever needed.
Do you see a concrete use case of such trees? Would you mind contributing?
(There is also an @assert
in sindex at the time, I plan to replace it with proper bounds checking, hopefully gaining ~1ns)
Yes, of course. Just want to be careful not to reinvent Lisp here :-)
Apropos @assert
, https://github.com/tisztamo/FunctionWranglers.jl/blob/c4ae2ce03f465ad762205438fea0e47ccc0c12da/src/FunctionWranglers.jl#L71 looks wrong/superfluous.
That's a copypaste artifact, thanks!
I was not able to quickly replace the assert with proper bounds checking that reacts to @inbounds
(never did that before, maybe my understanding is not deep enough), so I ended up removing it altogether.
The linear effort in issue #1 suggests that there is a use case for
FunctionWrangler
s which have aFunctionWrangler
asop
intogether with a binary descent version of
sindex
selecting the function of interest by a sequence of bits choosing eitherop
ornext
in each step.