[elephant-devel] Serialization
Ian Eslick
eslick at csail.mit.edu
Wed Nov 22 00:18:44 UTC 2006
The without-interrupts already fixed my problem and improved
performance 4x or so. It has identical semantics to locking but
avoids the OS overheads of traditional lisp locks. There's a nice
discussion of all those issues here:
If you would like to implement your optional safety compilation
solution; there shouldn't be much conflicts with the changes I'm in
the process of making (hope to checkin a whole set of features and
bug fixes over the weekend) other than in memutil.lisp so feel free
to go ahead and clean things up. I have no objections to the
proposal you sent out earlier (i.e., extra *feature* and reader
conditionals on optimizations)
The routine I used to do timings was pretty trivial (paraphrased):
(time
(let ((bs (elephant-memutil::grab-buffer-stream)))
(loop for i from 0 upto 10000000 do
(reset-buffer-stream bs)
(serialize 'this-is-a-test-symbol bs nil)
(assert (eq 'this-is-a-test-symbol (deserialize
bs))))))
I was looking at both the new and old serializers (I've kept the old
around for migration purposes).
Regards,
Ian
On Nov 21, 2006, at 7:04 PM, Pierre THIERRY wrote:
> Scribit Alain Picard dies 22/11/2006 hora 10:36:
>>> 4) Stick with the portable locking approach already implemented
>> Doesn't seem good enough -- the point of a multithread lisp and
>> berkeley DB is to allow concurrent access to the data.
>
> I think it is always best to aim at correctness first, then measure
> times, and only decide to optimize when measurements clearly
> indicate a
> problem.
>
> It is even more important with MT, because bugs are harder to
> reproduce,
> so, if the current implementation proves to be correct, let's keep it
> for the moment, and profile it to see where it could be made faster if
> needed.
>
> Theoretically,
> Pierre
> --
> nowhere.man at levallois.eu.org
> OpenPGP 0xD9D50D8A
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list