Le 19 août 2009 à 11:47, Charles Srstka a écrit :

On Aug 19, 2009, at 4:24 AM, Alastair Houghton wrote:

As I think I may have mentioned before, contrary to apparently widespread opinion, Carbon isn't magic. The Carbon file manager APIs are based on BSD APIs, and calling the BSD APIs in question is going to be faster if you really need high performance because they don't have to map things to the Carbon API's data structures and back again.

I *knew* I'd read somewhere that this wasn't true - that the Carbon file manager doesn't use the same opendir() / readdir() APIs that you'd use if you were doing this the BSD way,

If you don't believe Carbon use the BSD API, just do a simple File Manager based application, and check what append in Shark or other sampling software when you run it, or even better, use DTrace to check what syscall is used.

In some rare cases, it uses 'private' syscall (like delete) to perform operation that do not have equivalent in BSD world (returning an error when trying to delete a busy file for instance).

and that someone had benchmarked Cocoa vs. Carbon vs. BSD, and Carbon came out on top. What I didn't remember was that it was you who did it:

The last time I saw this kind of benchmark, the BSD code were poorly implemented and did not use the proper functions. That's why it was slower.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to