home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / c-runtime / tests / 30Nov91.perf.single.user < prev    next >
Encoding:
Text File  |  1991-12-01  |  1.3 KB  |  53 lines

  1. *    This may not be fair since this test was run with
  2.     a class posed.
  3.  
  4.  
  5. Some performance data:
  6.  
  7. for( i = 0; i < ITERATIONS; ++i )
  8.   hashIndex (classHash,  0x55aaaa55);
  9. 1000000 iterations, 4 sec (250000/sec)
  10.  
  11. for( i = 0; i < ITERATIONS; ++i )
  12.   func();
  13. 1000000 iterations, 1 sec (1e+06/sec)
  14.  
  15. for( i = 0; i < ITERATIONS; ++i )
  16.   free(calloc(1, 4));
  17. 1000000 iterations, 37 sec (27027.027027/sec)
  18.  
  19. for( i = 0; i < ITERATIONS; ++i )
  20.   free(calloc(1, 28));
  21. 1000000 iterations, 42 sec (23809.52381/sec)
  22.  
  23. for( i = 0; i < ITERATIONS; ++i )
  24.   [[ Object new ] free ];
  25. 1000000 iterations, 75 sec (13333.333333/sec)
  26.  
  27. for( i = 0; i < ITERATIONS; ++i )
  28.   [[ SubClass2 new ] free ];
  29. (super class must be searched for +new)
  30. 1000000 iterations, 94 sec (10638.297872/sec)
  31.  
  32. for( i = 0; i < ITERATIONS; ++i )
  33.   [[ SubClass2 newOther ] free ];
  34. (+newOther calls +new in its super class)
  35. 1000000 iterations, 102 sec (9803.921569/sec)
  36.  
  37. aObj = [ Object new ];
  38. for( i = 0; i < ITERATIONS; ++i )
  39.   [ aObj self ];
  40. 1000000 iterations, 8 sec (125000/sec)
  41.  
  42. aObj = [ SubClass3 new ];
  43. for( i = 0; i < ITERATIONS; ++i )
  44.   [ aObj self ];
  45. (-self is implemented two classes up)
  46. 1000000 iterations, 7 sec (142857.142857/sec)
  47.  
  48. aObj = [ SubClass3 new ];
  49. for( i = 0; i < ITERATIONS; ++i )
  50.   [[ aObj self ] self ];
  51. 1000000 iterations, 14 sec (71428.571429/sec)
  52.  
  53.