
25 Sep
2008
25 Sep
'08
6:31 p.m.
On Thu, Sep 25, 2008 at 5:09 PM, Manlio Perillo
Graham Fawcett ha scritto:
If you're on Intel/Itanium, I believe there's a CMPXCHG instruction that will do atomic compare-and-set on a memory address, and I'm not sure you could get much faster than that. :-)
I have an early draft of this type of database (written in D). Operations on integers use CMPXCHG, and for other operations a simple spin lock (implemented following the implementation in Nginx) is used.
And I thought I was being original. :-)
The problem is that it is a simple shared array!
I'm guessing you've also ruled out sparse arrays? If not, what complexity is acceptable on your lookup function? Graham (sorry if this heading off-topic for the list.)