|
From: Jim U. <ji...@3e...> - 2004-03-15 21:50:11
|
At 02:55pm on 2004 March 15, Richard Moats did write:
> Here's a comparison between GCC-3.4 and a recent version of Microsoft's SH
> compiler. The MS compiler produces the same code for all three cases.
Fascinating. I guess Microsoft's compiler optimizes the entire vector
like a built-in type (since it's made of built-in types with a default
constructor and destructor).
By the way, the tsunami vector has a default constructor which
initializes all floats to 0 using default arguments. For my tests, I
added a default empty constructor, "Vector() {}" to my copy, because gcc
doesn't optimize the zeroing out either (even though it's overwritten in
the next statement, a = b, with the default element-wise operator= ).
--
Ms. Murthy, who has never been outside India and does not even have a
passport, said she sometimes envied her callers' lives. "They have such
facilities -- 24-hour convenience stores, 365-day power supply," she said.
ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710
|