Email list hosting service & mailing list manager

Efficiency of generic programming Andre van Tonder (06 Oct 2005 19:02 UTC)
Re: Efficiency of generic programming Michael Sperber (07 Oct 2005 06:19 UTC)
Re: Efficiency of generic programming Andre van Tonder (07 Oct 2005 14:27 UTC)
Re: Efficiency of generic programming Michael Sperber (10 Oct 2005 19:37 UTC)
Re: Efficiency of generic programming Andre van Tonder (10 Oct 2005 20:03 UTC)

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