1

Topic: Virtual method + Exceptions in A C ++

, explain please why you do not agree with the thesis
"In  the project do not use the virtual methods and exceptions"

2

Re: Virtual method + Exceptions in A C ++

Because
Usage of the virtual methods and exceptions is not defined by requirements to productivity. They are simply used or not because there is no other output.
Usage of the virtual methods and exceptions not so shatteringly influences productivity as to someone can seem.
It is not clear also why you generally mixed these two technicians together, they are not connected in any way.
Why you solved, what exactly they worsen (probably) productivity, not clearly.

3

Re: Virtual method + Exceptions in A C ++

It was a question about ultra low latency projects with struggle for  and even nanoseconds
These are two factors (the virtual methods and exceptions) without which basically it is possible to manage and which import an overhead projector to productivity

4

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

It was a question about ultra low latency projects with struggle for  and even nanoseconds
These are two factors (the virtual methods and exceptions) without which basically it is possible to manage and which import an overhead projector to productivity

What is such "ultra low latency" - I here personally do not represent.
With ++ all is such factor without which basically it is possible to manage and which imports an overhead projector to productivity.
Write on With.
But it - too the factor without which it is possible to manage and which imports...
Write in the processor codes.
But it is difficult and intolerable...
DO NOT WRITE ANYTHING! - an ideal variant!

5

Re: Virtual method + Exceptions in A C ++

MasterZiv wrote:

it is passed...
What is such "ultra low latency" - I here personally do not represent.
With ++ all is such factor without which basically it is possible to manage and which imports an overhead projector to productivity.
Write on With.
But it - too the factor without which it is possible to manage and which imports...
Write in the processor codes.
But it is difficult and intolerable...
DO NOT WRITE ANYTHING! - an ideal variant!

It is impossible to do without With ++
It is possibility to write the readable objective oriented code
Do not distort senses.
ultra low latency is a project I  time of the response that  and  seconds

6

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

It is possibility to write the readable objective oriented code

TIN
The readable objective oriented code - without virtual methods and without exception
It would be desirable low latency - take assembler + Intel VTune and do not suffer
Call of the virtual method vs normal - superfluous storage access. With the registration that (5 years ago) was already> 50 independent  executions of such operations - that is required from the last processors of Intel the proof with  and screenshots from Intel Vtune what exactly the data  does not suffice and because of it there is a productivity falling.

7

Re: Virtual method + Exceptions in A C ++

Leonid Kudryavtsev wrote:

the Call of the virtual method vs normal - superfluous storage access. With the registration that (5 years ago) was already> 50 independent  executions of such operations - that is required from the last processors of Intel the proof with  and screenshots from Intel Vtune what exactly the data  does not suffice and because of it there is a productivity falling.

That even from exceptions it is necessary to prove an overhead projector))

8

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

It is impossible to do without With ++
It is possibility to write the readable objective oriented code

Then forget about picoseconds: for this possibility you already paid such  against
Which one assembly instruction of passage on the address in storage of weather does not make.

9

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

It is impossible to do without With ++
It is possibility to write the readable objective oriented code

With ++ without the virtual methods and exceptions it With with classes, i.e. remains one step to pure With - to replace classes with structures. Readership does not suffer.

semen.s.semen wrote:

ultra low latency is a project I  time of the response that  and  seconds

such projects of unit all over the world, it is not necessary to be guided by them generally.

10

Re: Virtual method + Exceptions in A C ++

Rushed...
Oh in vain I created this subject)

11

Re: Virtual method + Exceptions in A C ++

Dima T wrote:

to replace classes with structures. Readership does not suffer

Yes is not present.
Seriously suffers. I permanently suffer when it is necessary for  to write the driver. Absence implicit this leads to a large quantity of syntactic garbage ( arguments, prefixes in names of functions, etc.)

12

Re: Virtual method + Exceptions in A C ++

Anatoly Moskovsky;
+1024

13

Re: Virtual method + Exceptions in A C ++

I still would agree that in  projects on Java and C# there is an essential difference between speed of a call of normal and virtual methods, but not on a C ++ as even at a considerable quantity of objects, reduction of the size of a copy of object by the size of the pointer and an immediate call of a normal method (instead of a method call through the pointer taken from the virtual method table, stablly sitting in a cache-line of the processor because of constant calls to it through pointers by this table of the mentioned big heap of objects) increases productivity insignificantly.

14

Re: Virtual method + Exceptions in A C ++

rdb_dev wrote:

I still would agree that in  projects on Java and C# there is an essential difference between speed of a call of normal and virtual methods

There there are not virtual methods?

15

Re: Virtual method + Exceptions in A C ++

Anatoly Moskovsky wrote:

it is passed...
Yes is not present.
Seriously suffers. I permanently suffer when it is necessary for  to write the driver. Absence implicit this leads to a large quantity of syntactic garbage ( arguments, prefixes in names of functions, etc.)

Nothing hinders to fasten to structure normal methods. Will be almost too most that a class, only without the virtual methods and the pointer on VTBL. The implicit parameter this in such methods too will be, specifying in a structure copy.

16

Re: Virtual method + Exceptions in A C ++

rdb_dev wrote:

it is passed...
Nothing hinders to fasten to structure normal methods. Will be almost too most that a class, only without the virtual methods and the pointer on VTBL. The implicit parameter this in such methods too will be, specifying in a structure copy.

Yes a current quality of the code in comparison with With ++ will be as day and night
Leaving from the virtual methods this least of harms

17

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

it is passed...
There there are not virtual methods?

I do not remember. The last time communicated with Java about 10 years ago.

18

Re: Virtual method + Exceptions in A C ++

rdb_dev wrote:

it is passed...
I do not remember. The last time communicated with Java about 10 years ago.

But I know

19

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

it is passed...
Yes a current quality of the code in comparison with With ++ will be as day and night
Leaving from the virtual methods this least of harms

So it also will be a C ++. In structures on Si methods you will not declare.

20

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

But I know

You carp at a hypothetical part of the comment.
P.S. In C# there are the virtual methods.

21

Re: Virtual method + Exceptions in A C ++

rdb_dev wrote:

it is passed...
I do not remember. The last time communicated with Java about 10 years ago.

In C# there are normal and virtual methods. On productivity I will not tell how much differ. I think slightly, as well as in With ++

22

Re: Virtual method + Exceptions in A C ++

rdb_dev wrote:

In C# there are the virtual methods.

Yes who would argue
And not virtual are?

23

Re: Virtual method + Exceptions in A C ++

semen.s.semen wrote:

....
And not virtual are?

In Java - precisely is.
At least static final
IMHO

24

Re: Virtual method + Exceptions in A C ++

rdb_dev wrote:

I still would agree that in  projects on Java and C# there is an essential difference between speed of a call of normal and virtual methods

In Java - there is no such difference.
In si-sharpe, I suspect - too is not present.
P.S.
You truth think, what developers JVM it is such suckers who couples s for any hogwash stir up?

25

Re: Virtual method + Exceptions in A C ++

In Java is JIT
And most likely the necessary methods in the fullness of time become not virtual