I figured I should try and see how much faster I can make a simple test by using simd vectors rather than the equivalent struct types (in Xcode 7 / 7.1 beta 2).As a simple start I wanted to compare simd's float4 with a simple struct like this:struct MyFloat4 { var x, y, z, w: Float }So I used big Array<MyFloat4> / Array<float4>, and measured the time it took to assign them all, perform some operation on them like multiplying them with some constant MyVector4 / float4, etc.As I have not yet managed to write a test where simd makes the code any faster, I'm thinking:- Probably the compiler is producing simd code on its own when optimizing my simple benchmarks, thus it doesn't matter if I use simd or not.- But In what kind of code will it matter? Can anyone write a simple example that shows using simd is faster?(Yes I'm using highest optimization level, no emitted debug info, whole module opt)
6
0
1.1k