[Theory] How to speed up python code execution / pypy vs GPU
Ben Bacarisse
ben.usenet at bsb.me.uk
Sat Nov 5 21:42:32 EDT 2016
Steve D'Aprano <steve+python at pearwood.info> writes:
> On Sun, 6 Nov 2016 08:17 am, Ben Bacarisse wrote:
>
>> Steve D'Aprano <steve+python at pearwood.info> writes:
>
>>> Here's the same program in Objective C:
>>>
>>> --- cut ---
>>>
>>> #import <Foundation/Foundation.h>
>>>
>>> int main (int argc, const char * argv[])
>>> {
>>> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>>> NSLog (@"Hello, World!");
>>> [pool drain];
>>> return 0;
>>> }
>>>
>>> --- cut ---
>>>
>>> Which would you rather write?
>>
>> That's a rather odd comparison. Why not
>>
>> #import <stdio.h>
>>
>> int main()
>> {
>> printf("Hello world\n");
>> return 0;
>> }
>
> Because that's not Objective-C? (This is not a rhetorical question.)
Yes, I think so.
> I'm not an Objective-C expert, but to my eye, that doesn't look like
> Objective-C. It looks like plain old regular C.
C has no #import directive.
<snip>
--
Ben.
More information about the Python-list
mailing list