Slashdot Mirror


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."

7 of 83 comments (clear)

  1. Re:Benchmarks already exist by ciroknight · · Score: 2, Informative

    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
  2. Re:apple uses objective c / uses of fortan by TheRaven64 · · Score: 4, Informative

    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
  3. Re:Notice its C++ and not Objective-C by Anonymous Coward · · Score: 2, Informative

    Yeah, Ok, forget the whole language A -vs language B war:

    C++ is better here:

    vector va, vb, vc;
    vector vd; // .. fill data here ...
    vd = va * vb + vc;

    vs Objective-C:

    FloatVector * va, vb, vc;
    IntVector * vd; // .. fill data here ...
    [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(); // ... potentially way more ...

    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.

  4. Re:PLEASE: A vector-based switch statement?!?!?!? by TheRaven64 · · Score: 2, Informative
    Try Erlang. Not only does it have a binary (bit array) type, which is very useful for doing anything that involves talking to sockets, you can use pattern matching with it. This allows you to define a version of a function that is called when you invoke the function with an argument that matches the pattern, so you could (for example) have two versions of a function taking a bit-field, one of which is invoked when the third bit is 1, and the other when it is 0. You can do the same kind of pattern matching in switch statements.

    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
  5. Re:apple uses objective c / uses of fortan by TheRaven64 · · Score: 3, Informative

    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
  6. Re:Notice its C++ and not Objective-C by hunterx11 · · Score: 5, Informative
    I have yet to see Objective-C bindings for QT or GTK so for Linux it is a none starter.

    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.
  7. Re:Notice its C++ and not Objective-C by mrsbrisby · · Score: 2, Informative

    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