Efficiency of generic programming Andre van Tonder 06 Oct 2005 19:02 UTC

I have a concern with the efficiency of the current interface for reflection.
Some simple, and rather important or canonical, generic operations will be
rather less efficient than they could be.

- Polymorphic copying and update will be slow:

   Requires lookup of record-type-field-names, which is a list, determining the
   length of this list, which is o(N), and only then can the accessors/mutators
   be obtained by index.

I believe this could be fixed by either having RECORD-TYPE-FIELD-NAMES return a
vector, or having a RECORD-LENGTH primitive.

Cheers
Andre