[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Efficiency of generic programming

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.