normalperson / yhbt.net wrote:
> https://bugs.ruby-lang.org/issues/13517

For who care about 32-bit, single-core x86, here are my
Pentium M (Centrino) @ 1.6GHz numbers:

Size reduction of Mutex on 32-bit is 112 => 40 bytes

minimum results in each 3 measurements.
Execution time (sec)
name             trunk   built
loop_whileloop2    0.554   0.554
vm2_mutex*         3.136   2.217
vm_thread_mutex1   2.783   2.186
vm_thread_mutex2   2.907   2.174
vm_thread_mutex3   9.740   2.586

Speedup ratio: compare with the result of `trunk' (greater is better)
name             built
loop_whileloop2    0.999
vm2_mutex*         1.414
vm_thread_mutex1   1.273
vm_thread_mutex2   1.337
vm_thread_mutex3   3.766

In the future, I think the cond_waiting flag can be moved into
a FL_USER flag, too.

But I also want to try similar changes to avoid Array usage in
Queue, SizedQueue, and ConditionVariable classes and rely on
ccan/list + stack for waiters.  I will convert from T_STRUCT to
T_DATA.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>