Program effectiveness

I want to know if the effect affects the effectiveness of the program, using an object-oriented approach to the problem compared to the method of structured programming in any programming language, but especially in C ++.

+5
source share
7 answers

I remember back in early 1990, when C ++ was young, studies were done about this. If I remember correctly, the guys who took (well-written) C ++ programs and transcoded them into C received about 15% speed increase. The guys who took C programs and transcoded them into C ++, and also modified the imperative C style in OO style (but the same algorithms) for C ++, got the same or better performance. The apparent contradiction was due to the observation that programs C became more organized when moving to an object-oriented style. Things you did in C because it had too much code and problems to do better, it would be easier to do it right in C ++.

, . , OO . , OO, , , , , , , 1992 ./p >

+3

. , .

- . .

, , . , , , , , , , , .

- , , . : .

+7

, , . , , () , .

+1

. - . , , .

+1

, , .

true, . , , . , C, , . , , . , , .

+1

, . , , .

, . , . , ? , . , .

OO

  • " "

  • , .

, , , .

: , , , : - SomeProperty = true;. , ? , , , , . , - - . , , . , . , , , - .

. ? .

+1

: OO, , , . , . , ; , .

, , .

  • (.. ) , , . C, , ++.

  • JIT ++ .

  • , , ( , ). , .

  • , , , , .

0

All Articles