Welcome, Guest. Please login or register.

Author Topic: Should we really crack IBrowse 2.4???  (Read 85732 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline Bif

  • Full Member
  • ***
  • Join Date: Aug 2009
  • Posts: 124
    • Show all replies
Re: Should we really crack IBrowse 2.4???
« on: January 25, 2013, 10:15:25 PM »
Quote from: AmigaClassicRule;723927
Isn't C++ a higher level object oriented language than C? Wouldn't it slow things down for classic Amiga?


C++ is just as fast as C. If you use certain features of C++ such as virtual methods in your classes, yes, they can be slower than a straight function call in C (or C++). But a virtual method does more than a straight function call in C. To do the same thing in C you'd need a function pointer and then it starts costing you the same in performance.

In the end you can accomplish a lot of stuff in C that you can also do in C++, C++ just makes it easier by building useful concepts into the language that you have to otherwise code manually in C. As long as you know the cost of using various C++ language features and don't try to use features you don't need to achieve something, it's the same. E.g. using a class with no virtuals is not going to be more expensive than any C alternative.

On the other hand it may be that a given C++ compiler isn't as good as a given C compiler on Amiga due to how old they are (this is certainly not true on most other platforms). But that's a compiler implementation issue, not a language issue.