
The Supercomputer In Your Pocket: Metal and Swift - astigsen
https://realm.io/news/swift-summit-simon-gladman-metal/
======
sp332
Oh, it has a transcript! With code samples! I don't even know what Realm does
but I like them already.

~~~
joeblau
They make a database alternative to CoreData/SQLite.

------
santaclaus
How far back in time does one need to go for a state of the art iPhone to rank
on the TOP500 LINPACK benchmark?

~~~
sp332
1994, just the third year the Top500 list existed.
[http://www.top500.org/statistics/perfdevel/](http://www.top500.org/statistics/perfdevel/)
According to [http://www.cnet.com/products/apple-
iphone-6-plus/2/](http://www.cnet.com/products/apple-iphone-6-plus/2/) the
iPhone 6 gets 1.3 gigaflops.

Edit: Ah, I thought it looked low! That number is just for the iPhone CPU. I
can't find an official number for the GPU but one Linpack run got 1,023
Gflops. That means it would rank in 2004.

~~~
bitL
That is true for CPU, how about GPU? Tegra K1 is >1Tflop which would be the
total computing power available in 1994.

~~~
jra101
Tegra K1 is 365 GFLOPs @ 950 MHz. Tegra X1 is > 1 TFLOP @ ~1GHz.

[http://www.anandtech.com/show/9289/the-nvidia-shield-
android...](http://www.anandtech.com/show/9289/the-nvidia-shield-android-tv-
review/2)

~~~
stephencanon
"LINPACK" (without qualification) is a double-precision benchmark, and doesn't
measure raw compute flops, but what is actually achieved solving a linear
system. K1 does double-precision at a rate of 1/24, and good libraries
typically achieve ~90% of rpeak on similar hardware, so something around 13.7
gflops is a reasonable estimate.

------
jph
Metal is Apple’s iOS framework for GPU programming. The slides are about GPU
programming using Metal, Swift, and some Objective-C for features such as
shaders.

------
Osmium
This is really inspiring stuff. Highly recommend the author's blog[1] (sadly
on blogspot) and GitHub page[2] too.

His last section on 'advanced particle systems' might be able to be sped up
considerably by using an appropriate neighbour list algorithm (e.g. parallel
Verlet) which would scale as O(N) instead of O(N^2). I'm working on something
similar myself at the moment, though with far fewer particles, but it really
is inspiring to see it work with so many on a mobile device.

Can't wait for WWDC to see if there are any updates to Metal (and SceneKit for
that matter).

[1] [http://flexmonkey.blogspot.co.uk](http://flexmonkey.blogspot.co.uk) [2]
[https://github.com/FlexMonkey](https://github.com/FlexMonkey)

~~~
justinhj
Why sadly?

~~~
Osmium
Blogspot has a a really weird layout. It's very buggy for me in Safari, and
makes browsing old posts really difficult. It also seems to take a while for
content to even appear on the screen.

------
melling
Simon's blog has lots of interesting Metal posts. I've got them catalogued
here:

[http://www.h4labs.com/dev/ios/swift.html?q=flexmonkey&age=10...](http://www.h4labs.com/dev/ios/swift.html?q=flexmonkey&age=10000)

------
hyperpallium
Is the shader code available anywhere?

If every particle affects every other, wouldn't 2 million particles require
2,000,000^2 calculations per frame? 30*4 trillion interactions per sec seems a
lot... or is there an efficient trick to it (in the shader)?

------
sirsuki
Wait if the iPhone is so "amazing" why is the best games for it angry birds?!
Where is my World of Warcraft damn it!

~~~
awakeasleep
Angry birds does a better job of satisfying humanity's desire for a game than
world of warcraft.

------
_random_
Please add Metal & Swift to the title: mentioning these proprietary closed-
source technologies might change peoples' expectation.

~~~
oldmanjay
Do we really need trigger warnings for proprietary software? HN has never been
a dogmatic bastion of free software.

~~~
zxcvcxz
!UNPOPULAR OPINION TIME!

I was triggered. I do my best to stay away from Apple altogether. I believe in
a world where companies are shamed into oblivion for not allowing their
software to run across all platforms.

Apple doesn't work for the people, they work for the shareholders. Since I
don't own any shares I'm dirt under their feet.

A lot of people on HN like to talk about power and privilege but when it comes
to companies like Apple they make any excuse for their blatant platform
discrimination.

~~~
sp332
You had PTSD flashbacks from reading an article about Apple?
[http://en.m.wikipedia.org/wiki/Trauma_trigger](http://en.m.wikipedia.org/wiki/Trauma_trigger)

~~~
zxcvcxz
Hey am I not allowed to be a bit sarcastic? So many tumblrinas use that word
they've killed it's meaning.

Don't blame me, blame social justice warriors.

~~~
cpach
Please don’t use terms like SJW here. I can’t see how it’s relevant or adds
anything to the discussion.

