[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Objective-C & GNUstep Base on Ubuntu compute cluster: crazy?
From: |
David Chisnall |
Subject: |
Re: Objective-C & GNUstep Base on Ubuntu compute cluster: crazy? |
Date: |
Thu, 31 Mar 2011 21:43:26 +0100 |
On 31 Mar 2011, at 20:06, John W Kennedy wrote:
> Apple itself is obviously looking into that sort of thing, what with Grand
> Central Dispatch and OpenCL.
libdispatch also works on FreeBSD, and on Linux with libkqueue, using the
blocks runtime included with the GNUstep Objective-C runtime (libobjc2).
OpenCL may or may not work, depending on your drivers.
> There is a problem, though, with Objective-C, itself, in that method (or
> message) dispatch can, in some cases, represent a major cost.
Not so much - see the benchmarks from my presentation at FOSDEM. If you
compile with clang and use the optimisations in the the opts directory in
libobjc2, then it will do things like automatic IMP caching, so the cost is
only fractionally greater than a C function call. It will also speculatively
inline methods, so you can sometimes get an even lower cost.
Of course, in most code, you will be doing so much work inside the methods that
the cost of the message send is irrelevant, even without these optimisations.
David
-- Sent from my Cray X1