Re: [Vala] GObject allocation / referencing... Why is so slow?



Il giorno sab, 15/01/2011 alle 19.09 +0100, Jiří Zárevúcky ha scritto:

Yes, it's not the same, but it's a similar implementation, using
reference counting (it's not atomic, but if you use an sig_atomic_t ref
variable, instead of the volatile int, you would get atomicity with no
performance loss at all),

Not true I believe. sig_atomic_t ensures atomicity on an entirely
different level.
It has nothing to do with multi-threaded programming.

Mh, ok... So why using these features in Vala also when not using
threads? However I don't think that an atomic add or fetch-and-add (or
call them inc and dec-and-test) correctly used in plain C wouldn't cause
all this performance gap.





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