J
jacob navia
The bitstring module is finished (modulo tests). It now compiles cleanly on
linux and the few tests already in place give the same results.
This finished I will start implementing the first of the associative containers (hashtable)
for implementing later AVL trees and probably fibonacci heaps...
There are MANY papers bout associative containers, and many algorithms to choose
from.
What bothers me is that many algorithms look much better in paper, but in practice they
do not perform very well because of cache interactions:
The more overhead a container has, the less data that will be stored in the cache.
The less data stored in the cache, the more that the algorithm will "swap", i.e.
will wait for main memory to be ready. Since at 3GHZ the processor can do up to 40-50
clocks just waiting for main memory, all the cleverness of the algorithms is totally
wasted unless you are handling HUGE data sets in the order of several million
members.
The idea would be to implement simple algorithms first, then to implement more sophisticated ones
but maintaining the same interface.
The interface will be similar to the C++ STL to easy the conversions between
this library and C++.
At the same time I have developed a primitive template mechanism in standard
C, and tested it with the "vector" container. It is a very simple program that
expand a suitable written file containing keywords introduced by $@ ... @$
and produces a standard C file for a vector container specialized to containers of
the given type.
All this obviates the need for more complicated language constructs.
jacob
linux and the few tests already in place give the same results.
This finished I will start implementing the first of the associative containers (hashtable)
for implementing later AVL trees and probably fibonacci heaps...
There are MANY papers bout associative containers, and many algorithms to choose
from.
What bothers me is that many algorithms look much better in paper, but in practice they
do not perform very well because of cache interactions:
The more overhead a container has, the less data that will be stored in the cache.
The less data stored in the cache, the more that the algorithm will "swap", i.e.
will wait for main memory to be ready. Since at 3GHZ the processor can do up to 40-50
clocks just waiting for main memory, all the cleverness of the algorithms is totally
wasted unless you are handling HUGE data sets in the order of several million
members.
The idea would be to implement simple algorithms first, then to implement more sophisticated ones
but maintaining the same interface.
The interface will be similar to the C++ STL to easy the conversions between
this library and C++.
At the same time I have developed a primitive template mechanism in standard
C, and tested it with the "vector" container. It is a very simple program that
expand a suitable written file containing keywords introduced by $@ ... @$
and produces a standard C file for a vector container specialized to containers of
the given type.
All this obviates the need for more complicated language constructs.
jacob