• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Is Swift really swift?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is Swift really swift?


  • Subject: Is Swift really swift?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 05 Jul 2014 20:48:11 +0700

I just have converted some class from Objective-C to Swift. The results are somewhat disappointing:

Computing the primes up to 1e7 I get:

1.674     sec primes ≤       9,999,999 Swift
1.701     sec primes ≤       9,999,999 Swift
1.7       sec primes ≤       9,999,999 Swift
1.706     sec primes ≤       9,999,999 Swift

0.008284  sec primes ≤       9,999,999 Objective-C
0.008865  sec primes ≤       9,999,999 Objective-C
0.008571  sec primes ≤       9,999,999 Objective-C
0.008283  sec primes ≤       9,999,999 Objective-C

Swift is 200 times slower: 1.7 ↔ 0.0085 sec

Probably I am not using Swift very expertly. Also I know that this is not the final version of Swift - but still.

Has anybody better experiences with Swift?

Gerriet.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Is Swift really swift?
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Framework linking error
  • Next by Date: Re: Is Swift really swift?
  • Previous by thread: Re: Swift crash in dispatch_apply
  • Next by thread: Re: Is Swift really swift?
  • Index(es):
    • Date
    • Thread