Intel Software Development Products for OSX
rgraham writes "Intel has released a number of development tools for OSX, including a C++ and Fortran compiler. I for one would be interested to see some benchmarks of code compiled using these tools and Apple's own Xcode."
On the other hand, the numbers don't exist for OS X/x86 (publicly, yet). While you might get a general code performance idea, there are a lot of specific things that OS X does oddly that might cause one compiler to be "better" than another.
"Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
FORTRAN has a vector data type, which makes it a lot easier to optimise certain types of code for AltiVec, SSE, etc. If you write the code in C, you have to translate it into scalar intrinsics, and the compiler has to work backwards to attempt to determine the vector operations you meant. In FORTRAN you provide the vector operations, and all the compiler has to worry about is aligning the data so it can be used by the vector unit. For algorithms that can be expressed in a vectorised form, this makes FORTRAN a much better language for writing fast code, which is why it is still used a lot.
I am TheRaven on Soylent News
Yeah, Ok, forget the whole language A -vs language B war:
// .. fill data here ...
// .. fill data here ...
...
...
// ... potentially way more ...
C++ is better here:
vector va, vb, vc;
vector vd;
vd = va * vb + vc;
vs Objective-C:
FloatVector * va, vb, vc;
IntVector * vd;
[vd autorelease];
vd = [IntVector vectorWithFloatVector:[[va multiplyFloatVec:vb] addFloatVec:vc]];
Objective-C (err Cocoa) is better here:
id someObj, someString =
if([someObj respondsToSelector:@selector(stringValue)])
someString = [someObj stringValue];
vs C++:
BaseClass * someObj =
string someString;
if(HigherClass * hc = dynamic_cast(someObj))
someString = hc->stringValue();
else if(OtherHigherClass * hc = dynamic_cast(someObj))
someString = hc->stringValue();
These are only two examples off of the top of my head, but clearly, comparing languages without specifying domain is pointless, because I can come up with tons of examples where one is better than another. Hell I can even make VB look good if I limit myself to one of it's strengths, and avoid it's weaknesses.
I love Objective-C, I also love C++. I choose the more appropriate for the task.
Oh, you also have process creation and message passing primitives in the language, allowing you to easily write very scalable code.
I am TheRaven on Soylent News
The vector type introduced by GCC is vector-unit dependent. For an AltiVec target, for example, it is 128-bits. The only operations on it are those directly supported by the vector unit. You have to manually break your data into vectors of the correct size. In FORTRAN, you can operate on arbitrary sized vectors as if they were scalars. The compiler can easily break your large vector into blocks that will fit the vector unit and modify your scalar operations to correspond to individual or compound vector statements. It can also distribute your operations between the vector and scalar units on the CPU easily.
I am TheRaven on Soylent News
GNUstep may not be anywhere nearly as mature as Qt or Gtk, but it's hardly a non-starter.
English is easier said than done.
It's been a while since I coded in Objective-C, but last time I did, it didn't appear to implement C99 standards...
Probably since before 1999, or at least before C99 support was added.
int main() {
for (int i = 0; i < 99; ++i);
return 0;
}
Compiled just fine with: gcc -std=c99 -o moo moo.m