discuss-gnustep
[Top][All Lists]
Advanced

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

discussing a small but critical change with huge speed impact


From: Guenther Fuerthaller
Subject: discussing a small but critical change with huge speed impact
Date: Fri, 1 Jun 2001 15:41:06 +0200

NSObject uses a mutex called retain_counts_gate
to make refcounting thread save.
This is off course a good thing for the case
of default refcounting being done through
a global hashtable.
However the default behaviour in GNUstep
(triggered by REFCNT_LOCAL) is to store
reference counters in every object at
negative offset, which would be more
efficient but this speed advantage
is killed out completely by still
calling mutex lock (at least on mingwin).

I would suggest to bind mutex locking
to the REFCNT_LOCAL trigger so that it
is done only for the refcounting through
hashtable variant.

Off course this might be an incompatible
change for some of you!

Fortunately we can suppress the mutex locking
by calling:
[[NSNotificationCenter defaultCenter] removeObserver: [NSObject class]];
very early in the application.

Guenther



reply via email to

[Prev in Thread] Current Thread [Next in Thread]