[sr-dev] about matrix module

Marius Bucur marius.bucur at 1and1.ro
Mon Oct 11 17:41:29 CEST 2010


> I'd say that changing the implementation of the lookup function should be not
> that complicated. Marius B., do you worked on it the last time, what do you
> think about it?
>    
Hi,

I think given Juha's usecase, using the htable module is probably best.
You could use one htable and the two strings concatenated separated by a 
unused character as key.
This way you will have fast O(1) lookups and you can also use strings as 
keys.

As Henning said, the matrix module currently only supports integer 
lookups, and it is used as a generic matrix container.
What we could really do is change the matrix module to act as a real 
matrix and have O(1) lookups.
The current implementation is more as an array of lists then a matrix.
This way, the module could be really useful if one needs just a generic, 
really fast matrix lookup container.
I could work on changing the lookup functionality of the module, this 
shouldn't be so hard to do.

Regards,

Marius




More information about the sr-dev mailing list