New Scientific Library - Lang?

Discussion in 'C++' started by andreykuzmenko@yahoo.com, Feb 1, 2005.

  1. Guest

    Hello everybody!

    I'm starting moving out my scientific library (neural networks) from
    Delphi. Currently I'm being concerned with selection of a new language
    for its development. The library uses the following very intensively:
    memory allocation/deallocation, virtual method calls, accessing objects
    by reference from other objects, methematical calculations (various -
    arifmetic, triginometric), and employs collections much. It's also
    important what the library does NOT use any input/output operations and
    has nothing to do with user interface. But it needs to be used in other
    programs that have UI.

    I'm coding C# for the last couple of years and I'm starting to hear the
    rummors that managed code (like rinning under Java VM or .NET CLR) is
    getting closer in performance to the natively compiled code. It's
    definitely HARD to identify the robustness of the performance tests
    presented all over the Internet. Some of them are claiming that C++ is
    dying in favor of managed code, because managed code can gain from some
    optimizations (in virtual runtime environment) that can not be done
    during the compilation phase.

    I am also deeply concerned with cross-platform portability of the
    library and the programs that will/would use it.

    So, could I have some advice from you? What language should I use?
    Please do not just say "C++" (or maybe other?), but also explain a
    little!

    Thank you in advance.
    Andrey Kuzmenko.
    , Feb 1, 2005
    #1
    1. Advertising

  2. wrote:
    > [...]
    > So, could I have some advice from you? What language should I use?


    C++

    > Please do not just say "C++" (or maybe other?), but also explain a
    > little!


    Why in the world anybody in a C++ newsgroup recommend you anything *but*
    C++? Think about it. And what explanation are you looking for? C++ is
    _the_ language for many in the programming business nowadays, it is
    certainly _the_ language of choice for everyone who comes here on more
    or less regularly.

    You could ask in a language-neutral newsgroup, like comp.software-eng or
    sci.math.*. Perhaps there you would get a less biased response. But be
    aware that language comparisons are a futile exercise. Pick one and run
    with it. Use whatever feels most comfortable.

    V
    Victor Bazarov, Feb 1, 2005
    #2
    1. Advertising

  3. red floyd Guest

    wrote:
    > Hello everybody!
    > [redacted]
    >
    > I am also deeply concerned with cross-platform portability of the
    > library and the programs that will/would use it.
    >

    C++. Why? Because of the portability issue. C# is only available
    under Windows.
    red floyd, Feb 1, 2005
    #3
  4. wrote:
    > I'm coding C# for the last couple of years and I'm starting to hear

    the
    > rummors that managed code (like rinning under Java VM or .NET CLR) is
    > getting closer in performance to the natively compiled code. It's
    > definitely HARD to identify the robustness of the performance tests
    > presented all over the Internet. Some of them are claiming that C++

    is
    > dying in favor of managed code, because managed code can gain from

    some
    > optimizations (in virtual runtime environment) that can not be done
    > during the compilation phase.


    I heard claims like this about Java for ages, too. Although it is
    typically indeed possible to create fast Java solution which
    outperforms a mediocre C++ solution, I don't think that the claims
    hold water. I suspect the same to be true for .Net. However, even
    if the claims concerning .Net are correct, C++ would be an
    appropriate choice: Microsoft currently creates C++/CLR which
    compiles to managed code. That is, you just toggle a switch and
    get all the performance benefits (I'd guess you switch of targeting
    the CLR but maybe I'm wrong; it would not even matter to you).

    > I am also deeply concerned with cross-platform portability of the
    > library and the programs that will/would use it.


    As long as you stay clear of a few specific features (notably
    'export') your library should be compilable with most up to date
    compilers. If you are just interested in targetting many platforms,
    not compilers, you can use the whole C++ standard and use Comeau
    C++ which is available on virtually all platforms.

    For algorithmic library, C++ has much to offer which other languages
    do not: notably you can implement the time-critical portions STL-like
    on the basis of some abstractions and use only dynamic polymorphism
    where you really need it and/or in realizations of the abstractions.
    --
    <mailto:> <http://www.dietmar-kuehl.de/>
    <http://www.contendix.com> - Software Development & Consulting
    Dietmar Kuehl, Feb 1, 2005
    #4
  5. red floyd wrote:
    > C# is only available under Windows.


    Strange... I used C# (with Mono) on my Linux machine. Maybe
    Linux is now the same as Windows - I should really pay more
    attention to the news!
    --
    <mailto:> <http://www.dietmar-kuehl.de/>
    <http://www.contendix.com> - Software Development & Consulting
    Dietmar Kuehl, Feb 1, 2005
    #5
  6. Guest

    , Feb 1, 2005
    #6
  7. Guest

    Of course I'm also exploring other opinions. And yes, I wanted a biased
    response from C++ users, but with a little explanations. Thanks!
    , Feb 1, 2005
    #7
  8. red floyd Guest

    Dietmar Kuehl wrote:
    > red floyd wrote:
    >
    >>C# is only available under Windows.

    >
    >
    > Strange... I used C# (with Mono) on my Linux machine. Maybe
    > Linux is now the same as Windows - I should really pay more
    > attention to the news!
    > --
    > <mailto:> <http://www.dietmar-kuehl.de/>
    > <http://www.contendix.com> - Software Development & Consulting
    >


    I had forgotten about Mono. I hope they don't use "Is Not".
    red floyd, Feb 1, 2005
    #8
  9. wrote:
    > Mono ( http://www.mono-project.com ) is a port of .NET to Linux.


    Thanks for the clarification. However, I thought I was rather
    clear without any special intonation or marking (see
    <http://en.wikipedia.org/wiki/Sarcasm>).

    BTW, I wouldn't call Mono a "port": it is an entirely independent
    implementation of the corresponding specifications.
    --
    <mailto:> <http://www.dietmar-kuehl.de/>
    <http://www.contendix.com> - Software Development & Consulting
    Dietmar Kuehl, Feb 1, 2005
    #9
  10. Guest

    Sorry, I wanted to reply for red floyd and just briefly tell what is
    Mono... But occudentially responded to your message. Thank you for your
    responses. BTW, did they (Mono) implemented the standard as completely
    as Microsoft or there are some limitations?
    , Feb 1, 2005
    #10
  11. Guest

    Thanks a lot!
    , Feb 1, 2005
    #11
  12. wrote:
    > Sorry, I wanted to reply for red floyd and just briefly tell what is
    > Mono... But occudentially responded to your message.


    No problem.

    > Thank you for your responses.


    You are welcome.

    > BTW, did they (Mono) implemented the standard as completely
    > as Microsoft or there are some limitations?


    My understanding is that Mono implements at least wants to implement
    the ECMA standard plus some of the components provided by Microsoft
    which are not standardized. They also have their own replacements
    for some the Microsoft libraries. However, this discussion is
    off-topic in comp.lang.c++ and better answered on the Mono site.
    --
    <mailto:> <http://www.dietmar-kuehl.de/>
    <http://www.contendix.com> - Software Development & Consulting
    Dietmar Kuehl, Feb 2, 2005
    #12
  13. gipsy boy Guest

    wrote:
    > Hello everybody!
    >
    > I'm starting moving out my scientific library (neural networks) from
    > Delphi. Currently I'm being concerned with selection of a new language
    > for its development. The library uses the following very intensively:
    > memory allocation/deallocation, virtual method calls, accessing objects
    > by reference from other objects, methematical calculations (various -
    > arifmetic, triginometric), and employs collections much. It's also
    > important what the library does NOT use any input/output operations and
    > has nothing to do with user interface. But it needs to be used in other
    > programs that have UI.
    >
    > I'm coding C# for the last couple of years and I'm starting to hear the
    > rummors that managed code (like rinning under Java VM or .NET CLR) is
    > getting closer in performance to the natively compiled code. It's
    > definitely HARD to identify the robustness of the performance tests
    > presented all over the Internet. Some of them are claiming that C++ is
    > dying in favor of managed code, because managed code can gain from some
    > optimizations (in virtual runtime environment) that can not be done
    > during the compilation phase.
    >
    > I am also deeply concerned with cross-platform portability of the
    > library and the programs that will/would use it.
    >
    > So, could I have some advice from you? What language should I use?
    > Please do not just say "C++" (or maybe other?), but also explain a
    > little!


    You can't use (template) functions as objects in Java, but you can in
    C++; which will be a big advantage if you want to program the transition
    functions of the NN nodes like that, and genetic transformation of them.
    Java might be 'more OO' so to speak, but at a functional level C++ is a
    lot more flexible.

    I would however recommend using C++ combined with Lua for this kind of
    project. You use C++ to program the structure of the NN, and then you
    use Lua to fill in the details (transitions, genetic pools, and problems
    it needs to solve).

    --
    - gipsy boy
    gipsy boy, Feb 2, 2005
    #13
  14. - C# is closer to Delphi than C++ is.
    - The C# debugger is easier and much more pleasant to use than a C++
    one.
    - C++ will almost certainly always be faster
    - C++ is platform independant. C# is not.
    - C++ has many more free ressources that you could use than C#.
    - C# is still evolving a lot and depends on what MS decides to do with
    it in the future. Think about the VB 6 developpers.

    Myself I would use C# because I favor the speed of dev and debugging.
    Others will favor C++ for their own reasons.

    --
    ----
    http://michael.moreno.free.fr/
    Michael Moreno, Feb 2, 2005
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harald Kirsch
    Replies:
    4
    Views:
    2,815
    Harald Kirsch
    Aug 31, 2004
  2. Maneesh
    Replies:
    2
    Views:
    10,621
  3. JPractitioner
    Replies:
    13
    Views:
    20,119
    Roedy Green
    Feb 24, 2006
  4. Replies:
    1
    Views:
    2,118
    Irmen de Jong
    Jun 22, 2004
  5. manuhack
    Replies:
    1
    Views:
    295
    Victor Bazarov
    Aug 3, 2006
Loading...

Share This Page