Results 1 to 11 of 11

Thread: Which is faster C++ or Pascal?

  1. #1
    Guest
    I think C++ because its level is between Assembly and Turbo Pascal.

    Bye

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    By faster, I assume that you are referring to execution speed. Another assumption is that you want to compare C++ with Object Pascal and not plain vanilla Pascal.

    I cannot give you any specifics as to which is faster as I have not done any studies in this area. Back in the days of Turbo C 2.0, I did write a utility in both Turbo C and the then current version of Turbo Pascal. The C generated executable was 4 times the size of the Pascal executable.

    One thing to keep in mind is that Turbo Pascal generates a lot of error checking code (bounds checking, etc.) unless you turn it off in the compiler options.

    I'm not sure why stefano thinks that C++ is "between Assembly and Turbo Pascal". Both C++ and Pascal are high level languages that must be compiled to create an executable. The only difference would be the level of optimization that is built into the compiler and that can vary (within a language) from one compiler to another.

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Yes both C++ and pascal are High Level Languages but C++ is said to be at a little lower level than other HLL. C++ fills the gap between Assembly and HLL. C++ is faster than pascal, maybe not as much as from Basic but faster.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    I have heard this claim for years, but I have never seen anything that that specifies how C/C++ is "between Assembly and HLL". I really would be interested in some input on the subject.

    I worked on an Ada compiler in the early '80s as part of my CS degree. I found the subjects of language theory and compilers to be very interesting. Sometimes, I wish I had persued that line of work after school but it would have meant moving to "where the work is". I left the east coast for the mid-west, I didn't want to move back to a coast.

    I'm sure the art of compiler design has probably changed since then but, based on what I do know, I still have to say that C/C++ are just HLLs like Pascal. Somebody, please set me straight.

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    C++ and Pascal are basically at the same level, although C++ is slightly lower.

    C++ is only faster than pascal because it's much easier to write faster C++ code, and the compilers tend to do much more optimising. Also, being lower level, you can "miss out" a large proportion of the checks that the Pascal compiler does.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Guest
    if you're asking this because you are wondering which one is better to develope in, I would go for C++, because it is the "standard" almost everyplace uses it... I don't think i have ever bought or used an app made in pascal...

  7. #7
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Well Delphi is Pascal-based, so you probably have.
    Harry.

    "From one thing, know ten thousand things."

  8. #8
    Guest
    Delphi is OO pascal....

    and I have used delphi apps(inno-setup, http://www.jrsoftware.org)
    but not plain pascal apps...

  9. #9
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    It's the same discinction as between C and C++. They are fundamentally the same language.
    Harry.

    "From one thing, know ten thousand things."

  10. #10
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    What am I doing? I'm not going to argue about this, it's petty.
    Harry.

    "From one thing, know ten thousand things."

  11. #11
    Guest
    Ok, ok, i have decided to try and find out on my own. Here is what i learned. Pascal is smaller. There really is no difference in speed. C++ is way easier to read. And Assembly is the best overall. Thank you...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width