TL;DR The 6s runs my Metal particles app approximately 3 times faster than the 6 and can calculate and render 8,000,000 particles at 30 frames per second!
My shiny new iPhone 6s has just arrived and, of course, the first thing I did was run up my Swift and Metal GPU particle system app, ParticleLab. The performance jump from my trusty old 6 is pretty impressive!
With 4,000,000 particles, the 6 runs at around 20 frames per second, while the 6s hovers at around 60 frames per second. With 8,000,000 particles, the 6 runs at an unusable 10 frames per second while the 6s manages a not too shabby 30 frames per second.
Comparing the same application on my iPad Air 2 is a little unfair because the iPad has more pixels to handle, but the iPhone 6s runs the demos about 50% faster.
It took two minutes to update my multiple touch demo to support 3D Touch. UITouch objects now have a force and maximumPossibleForce properties. If your device doesn't support 3D Touch, the value both will be zero (you can also check traitCollection.forceTouchCapability == .Available), so my code caters for both classes with a simple ternary to calculate a touchMultiplier constant:
let currentTouchesArray = Array(currentTouches)
for (i, currentTouch) in currentTouchesArray.enumerate() where i < 4
{
let touchMultiplier = currentTouch.force == 0 && currentTouch.maximumPossibleForce == 0
? 1
: Float(currentTouch.force / currentTouch.maximumPossibleForce)
particleLab.setGravityWellProperties(gravityWellIndex: i,
normalisedPositionX: Float(currentTouch.locationInView(view).x / view.frame.width) ,
normalisedPositionY: Float(currentTouch.locationInView(view).y / view.frame.height),
mass: 40 * touchMultiplier,
spin: 20 * touchMultiplier)
}
You can try for yourself - the source code for ParticleLab is available in my GitHub repository.