At the point where you worry about performance, the leaf function may
need to be converted into a macro that constructs a vector more
directly. Right now, leaf will build up a list to receive its
arguments, and then have to apply the vec function to that list.
And then the vec function will also receive the arguments in a fresh
list and apply the #{vector-immutable} function. It's possible that
inlining at the Racket or Chez Scheme level works better than I think,
but I don't think the intermediate list allocations will be optimized
away.
[ ] in utils.rhm, don't wrap racket's vector->immutable-vector in a rhombus function, just export and rename to vec
per Matthew's feedback
inutils.rhm
, don't wrap racket'svector->immutable-vector
in a rhombus function, just export and rename tovec
leaf
a macro instead of a function