dankogai/swift-complex

Performance

Closed this issue · 3 comments

Currently Swift suffers some pretty serious performance issues with generics. After converting this library to not use Generics, I am seeing around a 30x increase in speed generating the standard MandelbrotSet. You might consider removing the generics until Swift is more mature.

Isn't this largely a Swift problem? I get that a performance tweaked version of this library might be nice, but a performance tweaked version of generics would be better.

So far as I see with my own Mandelbrot Set implementation (see MandelPlot in the playground), performance is okay with Swift 2. Swift 2 still has issues with generics (you can't still do x is ProtocolType, for one thing) but in terms performance it's much better now.

I considered closing this issue but I'll leave it open to pick up any hint to improve performance -- without giving up generics.

Perhaps the issue here is that performance is not benchmarked.

A simple test case may be the minimally viable product to close this issue.