[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: another try at multithreading
- From: "Jérôme Vuarand" <jerome.vuarand@...>
- Date: Wed, 25 Jun 2008 02:20:27 +0200
That is quite an interesting thread, though I'd like to come back to a
point that has been discarded too quickly in my opinion.
2008/6/19 Javier Guerra <email@example.com>:
> An obvious improvement might be to use finer locks, maybe one per
> mutable object; but a pthread mutex lock weights between 40 and 64
> bytes each. way too much. readers/writer locks are even bigger.
In some applications (mine at the very least), a 40 to 64 bytes
overhead per mutable object would be very acceptable. Did someone
already try to patch Lua source code to have per-object locks ?
Also if implemented like the default Lua global lock mechanism (ie.
with macros), it could be a good basis to experiment with custom locks
(1bit per object), hashed locks, or a combination of both.