OxSon / rrb.rhm

WIP: an RRB-tree implementation of a persistent vector in Rhombus
4 stars 0 forks source link

macro-ize `fun leaf(args, ...)` #8

Closed OxSon closed 11 months ago

OxSon commented 1 year ago

per Matthew's feedback

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.

OxSon commented 11 months ago

done