I want to be able to efficiently build data structures at run-time.
These data structures need to be accessed with minimal time.
The only a few ways that come immediately to mind would be
some sort of dynamically allocated array of :
(1) void pointers, that must be cast into the desired types.
(2) union of the desired pointers.
(3) An Inheritance hierarchy
(4) Possibly a union of the desired data types.
I need to be able to construct arbitrary data structures
that have as close to the same speed as those build at
compiler-time, yet I need to do this at run-time.
Does anyone have any good ideas ???
These data structures need to be accessed with minimal time.
The only a few ways that come immediately to mind would be
some sort of dynamically allocated array of :
(1) void pointers, that must be cast into the desired types.
(2) union of the desired pointers.
(3) An Inheritance hierarchy
(4) Possibly a union of the desired data types.
I need to be able to construct arbitrary data structures
that have as close to the same speed as those build at
compiler-time, yet I need to do this at run-time.
Does anyone have any good ideas ???
Comment