Hi Przemek,
Yes, Thank you. The most visible is the cost of mutexes in reference counters. If there is no collision then all is executed quite fast:ST mode (no mutexes at all): [ T001: x := L_C ]..............................................0.07 MT mode and single thread: [ T001: x := L_C ]..............................................0.13 Such cost is high though still accpetable but this:[ T001: x := L_C ]____________________________________ 0.67 18.20 - > 0.04shows that concurrent access to the same complex item is too slow.We will have to add atomic inc/dec assembler inline functions to PPC builds.
Also to Intel 64-bit builds I guess. (test above was x86/64-bit) [ I've yet to create a PPC 32-bit speed/MT test. ]
Anyhow in DARWIN you should have <libkern/OSAtomic.h> with set of functionsfor atomic operations. Can you look for 32 and 64 bit atomic inc/dec? They can be used by us directly.
Please see the whole file attached, there are multiple versions of these functions. Brgds, Viktor
OSAtomic.h
Description: Binary data
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour