bug-gnustep
[Top][All Lists]
Advanced

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

[bug #37494] Performance issue with NSNumber when used as key in an NSDi


From: Wolfgang Sourdeau
Subject: [bug #37494] Performance issue with NSNumber when used as key in an NSDictionary
Date: Wed, 03 Oct 2012 13:34:59 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0.1

URL:
  <http://savannah.gnu.org/bugs/?37494>

                 Summary: Performance issue with NSNumber when used as key in
an NSDictionary 
                 Project: GNUstep
            Submitted by: wolfgang
            Submitted on: mer. 03 oct. 2012 09:34:58 EDT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

When using NSNumber as key in a NSDictionary, the performance is acceptable
with low values. With very high unsigned long long values, the performance
drop seriously.

Here is the output of the enclosed test program.

2012-10-03 09:27:28.338 nsnumberaskey[23007] populating dict (low NSNumber)
2012-10-03 09:27:28.368 nsnumberaskey[23007] end population of dict
2012-10-03 09:27:28.369 nsnumberaskey[23007] fetching values
2012-10-03 09:27:28.386 nsnumberaskey[23007] fetched values
2012-10-03 09:27:28.414 nsnumberaskey[23007] populating dict (high NSNumber)
2012-10-03 09:27:31.490 nsnumberaskey[23007] end population of dict
2012-10-03 09:27:31.490 nsnumberaskey[23007] fetching values
2012-10-03 09:27:34.594 nsnumberaskey[23007] fetched values
2012-10-03 09:27:34.649 nsnumberaskey[23007] populating dict (NSString)
2012-10-03 09:27:34.711 nsnumberaskey[23007] end population of dict
2012-10-03 09:27:34.713 nsnumberaskey[23007] fetching values
2012-10-03 09:27:34.737 nsnumberaskey[23007] fetched values

The "low NSNumber" and NSString tests use keys with a value from 0 to 100000.
The high NSNumber case use keys from (1<<63 - 0) to (1 << 63 - 100000).




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: mer. 03 oct. 2012 09:34:58 EDT  Name: nsnumberaskey.m  Size: 4 ko   By:
wolfgang
test program illustrating the bug
<http://savannah.gnu.org/bugs/download.php?file_id=26688>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37494>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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