I hope this is the right forum for this question. If not, I9d appreciate
directions.
I have a simple Unix command line tool, written in C, and first developed on
Mac OS X. It9s developed with ProjectBuilder and is optimized for speed
(i.e. the default settings for a 3Standard Tool2). Using a reference data
set, the run time on a 500MHz Pismo PowerBook running Mac OS X 10.2 with
512MB of memory is 173 seconds. The tool was ported to Windows, which
required only adding the appropriate type definitions. No code was changed.
Running with the same dataset on an 800MHz Dell Inspirion with Win2K took 35
seconds!
After doing a bit of digging, I found that if I removed one call to
mktime(), then the run time on Mac OS X drops to 34 seconds. (The total run
time in this case does not depend on the value returned by mktime().
Returning 0 w/o calling mktime(), and calling mktime() then returning 0,
shows the same performance differential). Calling mktime() 625,791 times
adds 139 seconds, or 222 microseconds/call.
Why is mktime() so slow under X? Any ideas?
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.