> On 20 Dec 2015, at 08:48, Isaac Gouy via swift-users <[email protected]> 
> wrote:
> 
> On Saturday, December 19, 2015 2:39 PM, David Turnbull <[email protected]> 
> wrote:
> 
>> Winners of this test have pooled memory (apr_pools) and tail recursion.
> 
> 
> A simple Swift program that completed the workloads within an hour time-out 
> would be an incredible improvement :-)
> 
> Instead of looking at the "Winners" compare with the TypeScript program
> 
> http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees⟨=typescript&id=2
> 
> Why does a Swift transliteration of that program perform so slowly?

In one word: ARC.
This is pretty much a worst case example for ARC and the execution time is 
basically just ARC overhead.

To make this faster you'd have to improve on this.
The "simplest" solution would be to simply use UnsafePointers instead of 
classes or indirect enums.
Basically just rewrite a C example in Swift; not pretty but it should also 
perform very much like C then.

> _______________________________________________
> swift-users mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-users

- Janosch

_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to