osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OT: This Swift thing


On 06/05/2014 08:10 AM, Sturla Molden wrote:
> Perhaps, perhaps not. My experience is that only a small percentage of 
> the CPU time is spent in the Python interpreter.

Depends greatly on the type of application.  While it's true that most
apps that aren't CPU bound are idle most of the time, there's more to
the story than that.  A handy utility for analyzing power usage by
applications is Intel's powertop.  It measures things like how many
wakeups a program caused, and which sleep states a CPU is spending time
in.  It's more complicated and nuanced than simply adding up CPU time.

In any case I'm a bit surprised by people comparing Python to Swift at
all, implying that Python would have worked just as well and Apple
should have chosen it to replace Objective C.  Why are we comparing an
interpreter with a compiled language?  Apple's goal is to produce a
language that they can transition from Objective C to, and use to build
apps as well as core system frameworks.  Swift provides a cleaner system
for developers to work in than Obj C did (which, by the way has
reference counting), but carries on the same object model that
developers are used to (and existing frameworks use).