Programming

Vol. 9 No. 2 – February 2011

Programming

B.Y.O.C. (1,342 Times and Counting)

Why can't we all use standard libraries for commonly needed algorithms?

B.Y.O.C. (1,342 Times and Counting)

Why can't we all use standard libraries for commonly needed algorithms?

Poul-Henning Kamp


Although seldom articulated clearly, or even at all, one of the bedrock ideas of good software engineering is reuse of code libraries holding easily accessible implementations of common algorithms and facilities. The reason for this reticence is probably because there is no way to state it succinctly, without sounding like a cheap parody of Occam's razor: Frustra fit per plura quod potest fieri per pauciora (it is pointless to do with several where few will suffice).

Obviously, choice of programming language means that "few" will never be "a single one," and until somebody releases a competent implementation under an open source license, we may have several more versions floating around than are strictly necessary, for legal rather than technological reasons.

by Poul-Henning Kamp

Articles

Returning Control to the Programmer: SIMD Intrinsics for Virtual Machines

Exposing SIMD units within interpreted languages could simplify programs and unleash floods of untapped processor power.

Returning Control to the Programmer: SIMD Intrinsics for Virtual Machines

Exposing SIMD units within interpreted languages could simplify programs and unleash floods of untapped processor power.

Jonathan Parri, Daniel Shapiro, Miodrag Bolic, and Voicu Groza


Server and workstation hardware architecture is continually improving, yet interpreted languages—most importantly, Java—have failed to keep pace with the proper utilization of modern processors. SIMD (single instruction, multiple data) units are available in nearly every current desktop and server processor and are greatly underutilized, especially with interpreted languages. If multicore processors continue their current growth pattern, interpreted-language performance will begin to fall behind, since current native compilers and languages offer better automated SIMD optimization and direct SIMD mapping support. As each core in commercial x86 multicore processors includes a dedicated SIMD unit, the performance disparity will grow exponentially as long as the available SIMD units remain underutilized in interpreted-language environments.

SIMD for Everyone

Software design and computer architecture have seen the evolution of parallel data processing, but it has not been fully utilized within the interpreted-language domain. Taking full advantage of the available system architecture and features, especially SIMD units, can be very challenging for the developer. Such features are often disregarded in favor of costly but scalable measures to increase performance, mainly the addition of processing power. Virtual machines and interpreted languages have consistently abstracted and moved away from the underlying system architecture.

by Jonathan Parri, Daniel Shapiro, Miodrag Bolic, Voicu Groza

Curmudgeon

Two Books Alike in Dignity

Formal and informal approaches to C++ mastery

Two Books Alike in Dignity

Formal and informal approaches to C++ mastery

Stan Kelly-Bootle


Woke up this morning ... surprised to find my Sennheisers still connecting ears to my new MacBook Pro, with iTunes set to blues genre in shuffle mode. Lest you think I've succumbed to the despicable placement temptation that seduces so many columnists and filmmakers in these pursy times,1 I'm reluctant to price the named products, plug their sources (Amazon, eBay, Marple, etc.), or elaborate on the immense pleasure I derive from their splendid cost-effective performances. Suffice it to mention that the subliminal album playing all night was Broke, Black and Blue, Volume 1, available for 7.95 US dollars or 7.95 Apple pounds sterling.2 The album title (stretching the meaning of download to down-and-out load) is also remarkably appropriate for those living in Iceland, Greece, Ireland, and other economies suffering the effects of bankers' generosity fueling consumer greed.3

Last year was a mixed year in my bookish life. No shortage of excellent tomes but, alas, too many months of medically enforced prostration, conducive to reading rather than rent-paying writing. I should also add book listening, since audiobooks have proved a blessing when cruel Nurse Cavil orders, "Lights out! Extinguish all smoking materials!!" I have this great deal with audible.com whereby I get two FREE downloads each month from its infinite catalogue. I use the term FREE in the gullible gambler's sense. I do pay a modest retainer giving me the monthly challenge of selecting two titles that list at more than the fixed subscription, whether I like them or not. I'm joking, of course. The expensive titles usually match my natural preferences. I accidentally discovered last month that audible.com employs a remarkably customer-friendly algorithm. I had thoughtlessly ticked three titles: a @ £x (free); b @ £y (free); c @ £z (buy). Ignoring the P=NP controversy, audible.com's computer immediately spotted that x > z > y, and revamped my order to: a @ £x (free); b @ £y (buy); c @ £z (free). I intend to test their algorithm with more complex orders, aiming at aleph-0 titles, or as close as time allows.

by Stan Kelly-Bootle