All times taken on a 2017 iMac (18,3) with a 4.2GHz quad-core Core i7. All times in seconds.
Perl times show speed up or slow down vs corresponding solution in Swift.
Alt solution times show speed up or slow down compared to the same language base solution.
Problem Name | Part 1, Swift | Part 2, Swift | Part 1, Perl | Part 2, Perl | Alt sol. 1 | Alt sol. 2 | Alt sol. description |
---|---|---|---|---|---|---|---|
1: Expense report | 0.000104 | 0.001654 | 0.001519 -16x | 0.117217 -70x | 0.000194 +7.8x | 0.000808 +145x | Perl implementation of Ada's lower-half/upper-half algorithm |
2: Valid passwords | 0.007809 | 0.006821 | 0.004326 +1.8x | 0.001460 +4.6x |