Subject: All their info posted online

From: Your Public Record Available <[email-masked]>
Date: Wed, 11 Jun 2014 10:55:59 -0700

Public Records Now Available

Remember when you wanted to know something about someone? Do you think you know everything about them?

Enter Their Name Here: Enter Name Here

Searching For:
Someone Else
Yourself

All screening is done quickly and instantly.

Tip: Check to see what it says about you. your next job or reputation could depend on it.

(Krb-wg-archive) http://www.buytognos.com/name-first-lookup/8753567-loc.profile

‘

‘

‘

‘

‘

‘

‘

‘

‘

‘

‘

‘

‘

FFG DB Screening Service ∗(112 Park Slope ∗ Clifton ∗ NJ ∗ 07011)[Removal/settings/prefs]

Police Chief Glenn Chrisman proposes to add three more directed patrol officers for a new total of 10 to respond to neighborhood concerns, he told the City Council Tuesday night.

This basically gives you another team that can work (a neighborhood), Chrisman said after giving a presentation for his departments budget plan for the coming fiscal year that starts July 1. Directed patrol is a specialized unit to respond to specific problems reported by citizens and business owners. Its a tremendously powerful resource to address neighborhood crime problems.

The three directed patrol police officers are among the 10 overall full-time positions for the city government.

I was implementing an algorithm in Swift and noticed that the performance was very poor. After digging deeper I realised that one of the bottlenecks was something as simple as sorting arrays. The relevant part is here:

let n = 1000000
let x = Int[](count: n, repeatedValue: 0)
for i in 0..n {
x[i] = random()
}
// start clock here
let y = sort(x)
// stop clock here
In C++, a similar operation takes 0.06 s on my computer.

In Python it takes 0.6 s (no tricks, just y = sorted(x) for a list of integers).

In Swift it takes 6 s if I compile it with the following command:

xcrun swift -O3 -sdk `xcrun --show-sdk-path --sdk macosx`
And it takes as much as 88 s if I compile it with the following command:

xcrun swift -O0 -sdk `xcrun --show-sdk-path --sdk macosx`
Timings in Xcode with "Release" vs. "Debug" builds are similar.

What is wrong here? I could understand some performance loss in comparison with C++, but not a 10-fold slowdown in comparison with pure Python.