Linux Today: Linux News On Internet Time.

The Beez' Speaks: Benchmarking

Dec 27, 2006, 09:00 (1 Talkback[s])
(Other stories by Hans Bezemer)

[ Thanks to Hans Bezemer for this link. ]

"Even though it may seem that C compilers produce comparable code, the opposite is true. A switch() statement is transformed to a jump table by GCC and TurboC. XL C produces something that is comparable to a long "if..elif..elif..endif" construction. In order to accommodate XL C, the most often used tokens are in the beginning of the switch() statement. That's what makes performance such a difficult issue. What works for one compiler doesn't work for another. That's why more and more products – like the Linux kernel itself – are bound to one particular compiler or even one particular version of a compiler."

Complete Story

Related Stories: