Re: Exception Misconceptions: Exceptions are for unrecoverable
errors.
In article <hh3bev$lj9$1@news.albasani.net>, Branimir Maksimovic <bmaxa@hotmail.com> wrote:
tanix wrote:
In article
<ec7d2a9b-ee76-46b6-ae3a-587d199b66f0@s3g2000yqs.googlegroups.com>, James
Kanze <james.kanze@gmail.com> wrote:
On Dec 23, 11:21 pm, Branimir Maksimovic <bm...@hotmail.com> wrote:
tanix wrote:
In article <hgskgk$kc...@news.albasani.net>, Vladimir Jovic
<vladasp...@gmail.com> wrote:
C++ would probably be benefited tremendously if it adopted some
of the central Java concept, such as GC, threads and GUI.
GC is heavy performance killer especially on multiprocessor systems
in combination with threads....it is slow, complex and inefficient...
Obviously, you've never actually measured. A lot depends on the
application, but typically, C++ with garbage collection runs
slightly faster than C++ without garbage collection. Especially
in a multi-threaded envirionment,
[...]
Except that would require an equivalent of a virtual machine
underneath.
virtual machine is also heavy performance killer...
Which explains why some of the leading experts in optimization
claim that it is necessary for the best optimization. (I don't
fully buy that claim, but a virtual machine does have a couple
of advantages when it come to optimizing: it sees the actual
data being processed, for example, and the actual machine being
run on, and can optimize to both.)
Yep. And the more high level some abstraction is,
the more performance it can gain and the less of even theoretical
advantage any other approach may claim.
You believe in ferry tales... ;0)
I don't have to believe. It is pretty much self evident.
Why?
Well, because the higher level is your abstraction,
the less impact the language has. Because you have a virtual machine
underneeth that can do anything you please, and as efficiently
as anything else under the sun.
Basically, you are running a machine code at that level.
About the only thing you can claim is: well, but what are those
additional calls? Well, yep, there IS a theoretical overhead.
But once you start looking at the nasty details of it, it all
becomes pretty much a pipe dream.
There are ALL sorts of things that happen under the hood, and
in plenty of cases, your low level details become insignificant
in the scheme of things.
Simple as that.
Greets
--
Programmer's Goldmine collections:
http://preciseinfo.org
Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript,
organized by major topics of language, tools, methods, techniques.