From: Eric Wong Date: 2017-04-28T07:52:59+00:00 Subject: [ruby-core:80918] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit 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: