lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The issue with that design, though, is excess copying. If thread A sends a

This is an issue only if you are using small CPUs which are not heavily
pipelined/superscalar (GPU cores, MIPS microcontroller..).

Your bottleneck will be most likely lock contention caused by threading
in the first place (mutex [sic]). Keep the shared state out of marshalling
code and you'll have to lock less, thus major performance win (but still
a lot of locking overhead).

If you are serious about this (and not just overoptimizing prematurely),
consider http://www.liblfds.org/