discuss-gnustep
[Top][All Lists]
Advanced

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

suggesting some small changes with huge speed impact


From: Guenther Fuerthaller
Subject: suggesting some small changes with huge speed impact
Date: Fri, 1 Jun 2001 15:07:52 +0200

hello,

I would like to suggest two small changes
which have a huge speed impact - at least
on mingwin.
The speed problem is caused by mutex locking.
The solution tries to avoid mutex locking
as much as (I think is) possible.
The lock is done in NSZoneFromPointer
and this is called from NSData.

In NSData.m I suggest to add the following
method to the class NSMutableDataMalloc:
- (void) dealloc
{
  if (bytes != 0)
    {
      NSZoneFree(zone, bytes);
      bytes = 0;
    }
  [super dealloc];
}

In NSZone.m in the function NSZoneFromPointer
I suggest to add the following line before the
locking code:
  if (zone_list == 0) return __nszone_private_hidden_default_zone;

Guenther



reply via email to

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