Optimisation des membres privés en C++
Optimisation des membres privés en C++
. . '
, • I ,· \ •. •, I' I ' • 1J I I , ""
I nc,me1 :-
I i,
" bi/cl close •J
unde,-sfond rance.o
I
I of
_ , ·\
. 1. r r'i ~.1.i-,,, .: aI o. C/1'.
I
ral
7.//e /f=rocu--- - - -- - -- -
'( ,
'
I
,.,
. 1 • •• ' •
J
\ ', ~ I • I, f
. ~ \
.. '.
b C I F(
..... . j•' ·, , . J
. , I ~
c/as
I
r,,.,i;ec. l
•
, -: . I •
~
• •J : l ! .. : J
I .
- ;) .~ -
·. •. ?
-- -
- -- - -- -
--
- -- - ; - - -- -
-
r - -- - .' I
- ----
-# -- -
{,-- - - - t'
·ut r a r a I L o an
~o
--1...[Link].:_..LLnpL2-Y
-- ----
- - - - , r---
r -- '· ; ~• . \) .
i
Q
' . '
I I '
I ,'
• 1
• •' • •, I \
*
. - -
[Link]/r''r?J cj. ··
J p crof<:rv
I
k lh o ] ? 1·?-1..Ji
/ta;- m u! lt 'p ]c mecu1
6)
· on op e~ ah v f/roJ
nda,,.d
aJJou..JF y; u ffJ --redeli'ne It o w . _ ·s.1-a'
ct -+
( oo
[a se_ a f U re /s a tj> -> in dp Je 6
• ;J !- ,y ~
.
~ 13 u I ( ar, 17 o J o v f''Y Joa J
.. . * ~ : ? · s: z t' or.
. tii .r
,·.•1,..(t,,t<
Jf · (jj.('. 57
J __
'J
i
,
-~
~.
. '
'
'
..
I
· ·,/i sa I
~
6a ,i,o/. · I. .
.l \
ho)oq'r CJm
--- - " --- ~ ~
-+
..,
~ ~ - _: - -
-
f_ -U .' _
· ---:- ·.
·_ _ ·
f- -U --~. ~ ~ -; -- -- -- ~
1/1
_ __
•
-,~ vJ~ ,
flyh -rlc / Jnf te.. ,.j/ .or ,rt'
, . . .
vo id sp rc1 I <: () {, , 3-
T->tr b lic
rJ>u/.J lie vo irl JTJove To (dou/;II','),(,
c!u u6 lf;
I
'
1 - - '
~
,-
'·__ ___J
_:_ c~:__
t l~e_:N~ (o I ru I f"t, j :r
{'. / f J
=--..o;9~ f">
~ - - - - . . ill-.:f:_/_:_o_:_s_:£~ V
~-
~fl~
_J_ _ __.!.1/ i m:..:.1_..:_o:::_ :_ 1---
_/_,·~
i"m
1 ~tt.:....:
l_:_ r -----,;-_ _ _ _
_=-:._
_:_:__::aJ
- - - - - - 1 ._ ___:
, · I!- it o o deli Jir:J 11 C/ - II -
~
-
-' l___:_
N_::
o~._ d~
a~ d:.. :._ I
,':._:i~ o
n-= J__.
....:. ::a:..:I~ :~
~i~hll~l:_.!r_.f'
.. / >
~ -- - - ~
....,.,., ()
------:..:... - - - ~-:-h: .-:- -~"-- l - ~ - - - - - - -
-~ -- =- -- -= -- '~ -+ ~·1)~u.:...6.:'. .l~•c_
~ ~• :. · ~(o~l~(~J :..:_l!_:_f,·
l: _:y:..:_f1_:,1r..:_n
-------------
- - ----1-
' =~ u: .l_ c
/-=-_r:D o
---; ~~ ~ +
~ q:::w~qL
. o.!l~
_ --'V'-"'o~i
j):__:i~r. :. . : <i,:h::_.
. . c~ ~ ~ ~=- ----+·,.,~~ V ~o,__:_
l_:l__:_ .=_U:::._:n
' ::___'?'
--- --- --- --- ---, -'--"-''-=
I
:....:.
11
l _ _ __ ____::____
-
__ :_ __ ._ __ __ _: __ -= ---
--------- - r
f=== * /: flue S5 5fecificY1·
i'.~l=h=e=B--:=.;=,=(z=,:::.(f.
- ):_r=a=
7 = ~-
-::--0-s-e- (}a=(JJ 1 '71bf_
_ _rr_f
-tl-nw
--- --~ -- - -,li-::53
Y'. ~jLla-·.: ·Ltl!._hJ;__e-L;.d'[Link]{'.}J/t'~dL_.t:.[Link].flofu1:..:.~.:·
- - - - - --ii!:. .WFIL. i.c[.J. l('......,3.....,.s:,____,.:i-Lfp=c~ciu Du·C_J_"rJ_C_ fi+[Link]'.GfOa..:'.:r_
___u_
-= := == =~-~ ~- == =- == == =
-------iG:1
- - - - - -- ti'- --- -- ,--- ==~
- - ~ -- 11,,- -- - -
1
,; 1G~.)L->e_ _ _ _ _o-___1)
. . ,__,__..I~
,r:2,..,.. J_.1.1::J.J i lLLJ/OI.L.L.!Ie,___Jn_!_!__ t'n'-'--:.1'..!:'b:.!...t
1 D.
- - - _ j·-cL..,Lu'a{.t:..).). ·s::____Jc',.j_,u;l°:..___,A':/~.!.LGiru1~r~s--1r
1
/ ':_.J_h'.LltJZL):iJ
o~l_lj_h1.1.e_
. 'LrIL.----'=
· -~
ii.1J.b.1JJe~-t--Et:~"3:: -h
!: -llte cleYttJ-ed cld f£•
· · ~ · 'P·r oIte l ed · ITft'/Tl b n-.r of Ihe £oft
Ii _clc;.rs be come a-=riuo le meo2hn
(!JI ·Jh:e d6 iu·/J · - <'-la,)s•
, Pu/2/Jc n, em ht r or base doJJ
1,
ii
'i o ,:f r .
I
I
1J4s-e ~ qs- r:
hct/ YJ,- ,/ 1
I
1I
I
]' l1
1,
j'1Je'liue d. {
j
s >-
1 u6 !f7 ,,}
~<n-1 V(
s: -yj'''1::iU:UfhWr:LJ.f~e':.2.-r:....:·~ - - - --:---:----~
_____:_·_· ~i----'_._a.,.s:.s:~'~
,· ·.
, ·, I ; \ '
.. :
. .. I. .
, .
\ . \ . ·,' .
\' ,, ' (
( / • I
)1
·.'
' \.
..
\ ' n
.,
<G I ,
S: 't v
I
Ii
I 1 .-.--=1 ==-. _, _..:;• - . 1 - - 7 ,r _ I
- ( ·_.__-- - -7- , - . 1- -L - - -•
: --
2
> ~~o Ial cJ
f O rp? i uaLc____ln_t..rrl.b..t~_L_ f-J, e /J~;;-
. ln u e [Link] ('
!....!,_"~m~
~ :,L'Y
'-.....--- --.. ;._: ---- ---- --_~c..!,!la~s.)_s_ fO Ihe
_
"-- - - - -_ _ _ _ __ _ __,,d=1-..!.,,.......,_et.Ld_ii_ss.__. _ _ _ _ _ _ _ _
" " rp-,..oJ ccfed mem bexi a f f he ha1c
"-- - - - - - +11---I-- - - - - - -~cl~c,_·s.~s_ . b ~ p "ro Jc cIrcl m era~ eYt
. r~~~-
--1 ( er
~ ~~ ~~-...
' · e·d~ rJa.,;,r --'- ---- -
------- ---- ---; ·
I --1-- -------:-- ---'"-
; r;) I, l e h ,y o/' /:
, - -- ------'--- - - -- - - -~ ~~~ ~ ~ ~-~ -=-, -~.><.. .:--
, - ----- -i-:- -- - -- --
brr
~~~-' -'-'~-U ..!..1. --i,,~.><..!.......S~'--'-"-.L.L.!...:,.L..!..L.£.:~
cle;-/
- -- -~'- -----'--'--''-'-----'-- Ut>c{'
'-'~~.__ ; c la.[J"
__............,.Co<.L..-_ __ _
-.. . . - - ----+-- - --
.. ' . .'
1) ? ublh in d
- -- -"'- -
_ _ _ __C l r , ~' - - -~ - - - - - - - ---j--
. nllrnh -er lunr/J 'clb
(
t
-; J ~ !~ ..:..~~
, .,
b., ... ..:.. r:
!... $, !~ ~ /': _
,,.,
~
,. . :.-:_c,, _ ·/:..~
..... .,,,,,.._
,,..~ ~' ,. 7
- -
/?, ,.,, ~-! --;_! ~r;;
-- --,.
- ·~- ...
,,.
..,
; ....,,__
, _, , .. -
,,
,. -
... --r
-
,r
, ,/
--
t,,, _,. ✓
It ,
-,
✓
/ /
,,.__,,. -)
r
) ,,,,r, '1 ---:(',
,:; '
.., !,, _,
/
,,J , ,..,
, .. ,d , . ·--, Jr,
(
; ,,,,
,,, ~
,._,
/
1 '
I:,,~
-- ✓
J : _,.-;
f r. -' I e, ,I J
~ , - , J , r ,, d,;: , r- -~, , _ J -:JI , " ' ~
J ~-- r I ✓r, :I r,J~
I
i
- if: =.~ --- --- ~- - --·- - -
!!I f Ias5 <Dcn10 t.
x id-1lrn r19· e,
. -i'_ce1u1,cCLl_:-[Link]
- - - - -.2.f.u1 ·( D e01 o ohj~--.J-.._·- - - - -
_ _ _ _J.1_,LL 1i ;
'XO :; 0 • o, ia I yo : o · o.) : '>r cxo_J, y(yo:
---- ....: ..- ---.1:[Link]:Lmu.. uo_ CdMhle
1
void Io-riHf r) ,·
I ' •
I {)71 {/Cl ff '
I I . ,
cl o u bl e ?1 ; in/- '/ ;
I
" '-lc,id Veraa : : Jn-ri rtl () I .
,
Co u t < < '' ! /1f j jJ y ' ' ~ <,' Y <. l:' ,-('/1 dJ ,
. ''
...
Obi ?1 t-; tooj ,
J I .
c' o u I < < ' · 7/.-11' r ;J o !J 1.• -n , <: <
I I • I . .
·O- b'J • .-x < c r n JI 1
3- .
I
* ila s e •das:c
mem ber r
· ,mer11 6 e-rf
,o
.. How
rn
ti
f' ~
4
baa c cla<.
,
ctpf ea.,
_ J
f-rlv rd ('Jg
'... .. .- - . ' ' .. ~
1J~; uale : X
6aJe · rJq_J/ ~ .-. -. 1?.,.l.1ia/e ; t
f-lrolrded : 1
111\
,.,..,,, .
bl,r. 'Z ,
. . •
· · · CTJ-I J (i
f') '· . ,
C'
• '7'
· v
. ,.
'D. . ,'aau~JJi/2 Je
J-r, uc,l r: x 1
><' . i r
_ _ _ _J1J.. ..
. [Link],bt. 1Luic~ : l. . ·. '- \, Pu hlie .· ti
,, I.
I'
' I
11
II
,,
'f
n-r em h e-r
~ ·' ~
... ·' - - - U -__ j~L4 -Lil e.J.l n~_ ,_- - - - - - --
,,
!_: _ _---IJ___ _ _ _~ ('- _ ~ - - - ------,
,, - - - - - --
r ---- U---- -f22...LU...[Link]..[Link]...JLJ.'..LL....!,_
J
J
d ;
'7>t lie h-rr br:"Yr
.------- --H-__ '._..1.! .~"----~ ~-'-=..: :....:.._' --.!.. ..----
-- - - - - - - - - --
!. . !. .J----=)__,__ _ _ _ _ _ _ _ _ _ _ __
_,_,e. . . . . . ,c-=---_,__,_·L..L,!_J--+-'-i.,--1--=-
j'- ___,___--.+- -_11
{,
e--r •
11
I
11 . ,_ . . . . . . _ _ _ - - ' - - - t t - -.- - -' ~l,LJ.L,!....Ll.:!...J..1..l'J....IJ._~~.....J-...!.~ ..L.L,.l_L..Lj~_ >L..L...- - - - -- -
.,
✓~:'
' - - - - - - f t - - - - - - " "::....L......LJ.4...L..1...LL.,!.-..l..l._ _ ...[Link]..L.I....J'....l .--,J..__ _ _ _ _ _....!.......:.---'--~- - - - --
. m ·(J : d ~. .- ·
th{' 13t:1~-r- D
t"{)erTTcn--j l qdO"Y C'"J -s : 102-0 10 2.. ~ ,032
·, ' .. i
-- Ji 1)ec/a ralidY J.
... .. . '
•
-
. ·' I '
- /I , [ . 't
' ' I J
..
i ,.
I7
,, . ?,
l
• I
J
I
.
I
. . .
17'' ~at □ ~ 100_; ✓ a~\ d ·b\·e., o ·s ,r al ue- ) , . e I oo t
~ n1 cm er, lo ca~ io n , o2(
• I
I .
* I:
'Poi nie-r Type s ·
. ·.;·
• t ~- • •
rpoin-/e,y
ot objec ·
' ' '
e "Poin~ey' --+a chOY objec Js .
,e rro j n ~ rY ~ UJ ey - d d j J7 e'd Obj rCj S ·
obj r:cJ ~
,. I
= = = ===: : -
= ~ ~ ~= __ __
, I
• • I I
:± := J ' :~ = · ____
_
, :=-=-=_:~.~~-H>-=~..::...:.,..:..~:..-:---✓2-.:a:.-Y:'~·
== = := b...;I_
e1::_.:: e=--_
.. , -_E o..;.f.._ _w....aJ
-i·uJ
n._:_.~t; v
-_ '
\\_~ _ :
'1_: -Y_·i -=d-~J::~, l
::,__
t1 1
e:_· _..:-'..~
1 .. II
~Y~a~J i
:l..~rJ Y
!. J
..!. 0
IQ
~
~
-
--fr_:!:::..:..-c=-~c
-
-
-
-
- ' _J
-
::_!n. ~a'.!n.!..7!~t-:_
-
.-.- - -- -
•_ . -
-
~ ~ ~- ~ ~
o ;
~ rt
0_ 2 f~e~,y:_ _
.·_..,,.....--- - - t r
• I
G
~ L J r :. .L
. ,_ , --
.. , J •
r .' . '
e
(>
a
-L
I
- 1:trL1eJ1L(Jr-¥_a_d_ci-1U
---...!L. ·. I O2 0 ,0 2- ~, ,·, 1 . • 1(I' 3; 'l-
1- · · I <g ~ I _ta rr- I : ·~ I· ·J ·
11 .,_ • • r . I • ! •
1
•
' '
r
II
Ii
II r o, 1\
1:
..
•
·· 1I,:·: rrn. °"'
I
...~ ~
11
1 hr y Ct I LI e G ~ eO \1 i c'~ : JJ,. 1'.):t •.➔ h,c add r cs .r
I' () r
"\J a')' i (\ hI t, . e.
I•
rncrnOY'{ I add'>'css- ·. 10 ~ 16 31
I c, C) • • • t o [Link] .. , ..,
c,. p
"l2c-ruJ-t J,r . -
Ioo
(Q"l..<t
l6 '2. l/ lo~ -
lo ~2 .
A £xom le '
*• I
Poin~cy
ll \ C ~152
. . . .· .. · 'X. j
, . -- - - - - - t t -----[Link]...L.L-___.,_.._ ~-+-- - - -- -- __.:.__- -!-==,,....:.,~- ..!__~ - - - ~-
1>
.'
. . .. I t ~ 4 •
• I
. '
.....
' ~! si) ~,~) 'LU<tl:'°"_
< 6 .rt~~ a_
rr, ~.
~ - , . ·'
__ .'__:_.~'--· ~_'._- !..1 ,__' :
~- •
~--~~ - ~n cl ft de i
.· .,, , , , ~ ~ -- -
~ 11 nornespcicc std :, , ... ,
u:d
~ i ,,~ rn n·, n o t . ,. .
-- 1.r ·
• I
I /
/.o
·I l -ya lue
lu tJ I .=- ~ .
11
~ t:: Yd Ju i:-J -!c ll/- -1 alu e2 .
cou ½ ~< '''.,_
.
:J□ ~i~b· l
'
*
I
1
CR efe:-i cncc : ~- .
JI /,
, , • j ./ I
• • I•
,.
..
- - - - - - : - - - --
- - - - - - - --- ----------
-- - - - -
.-.- ------.JI-
' I
'-'-
-- - ---
.f~ence
- - -~'
I
~
I
-.:=--=-- ~ =...
' '
~ -=--= -, - ·,-- - ----= _r_-:, -
•
_ t- _ _-_- - ~
I
- - ' - --· '
·1
· _•- - - -- -- -.
i----- _J
---:J =:-= -1 - - ·· - -1
'<:::
6
/·Poi n f c:, an d A~-ray .\':-· . ·
C1Y1 l,i tt
Th c n a m c o f o n a ,y.; q 't · p o
,
int r
, c_µ f-c. cJ J e o."r'Y a ✓
-+ h e f iv ir J e It"IT l c rr -1- n o J th e
1
,
-----
-------'--
, - -- - . L _ --= == == ::;: ;-- - - _ __ _ : _ _ _
____, __ _ _
'-
··====.:......
(0..:_1-=--•..!-r_ l-CJ_O_u_ __ ! , _ _ _ ~_
, . - - - - =U:.:..+-/1 -.::_
- --
l J r! ---·
'---l=C= ··(_o.,....:o--'--
_.__T---= · .- ' - - - -- - -
; C,~ : ,,__
-"-·-://
, _ _ _ll C ---=
tt-·-
q' /
--tr -
/~~3;_]__~ -- J
-- ,
l-
-·. __
~_0:l
.:__;
,__
:_ _ _ _ _ __ _ · _·_ __
_
==- -- --
c C1Y1 rk i n .J.
• ; R')'Ya v r-l o rn e i r p o ,n t f:fY
0 [li 1 '2._ 2
-
·1 r~,l_e1~
fl:r --. 0¥~'P_o~ ~- - - - -- -- - -
-'K I 11 u1tip le
- /1 !10th n □nd 'fc_ill'~ pol rHo -k> +he sr,~ +
0
rO J -=tt· n (1q de <i os.\ 1eam
p OCltTlf..[Link].11J ~ ~} d~ •> - -- - -
p [ o) n- ' -t ( LJ_ _ __ _ __
rrf s -: 2, c, ;c , 1 ,2. 1.
(l [ J 1- 2 ill~ * P : ti- a [ IJ '
:,
~cdif!'ric un(-1;
[x
---- - - - - - - - - - - - - - - - - - - - -- -
- - - - - -- - -
- - - - - , - - - - - ~;:i_- - - - -- -, - - - - - - - - -
;,,~ P ::: rz ew J n) j .
- - ----- - -- --- - - -- -- - - -
- -
-- - -- - - - - ----- -- - - -
JI
I
'---===---== - - J ..:.. -
- --- - l _ -. _ _ I
I r l-e ,
_
_-,__
_· _,,.,c__
-
• • rf"'.. .
\
Je fel e pj
de Id e p ~
. . '. . .
C, 5'frr/o'){
•
1
ld ho·-e
SV(Y1e ·l'/ ft' .
P ;J n poi/7/c,y a+ -f' /pe
rri-(JY) ,.r th e r-/G · of o bje da ---1-o be ccrni-1·>-ud-e-r
[7-pre
; n1 -t P , n .; I o ·i I p/ -- -
, P -=- Tl f w in ~ ·,
I 1--f t'W
II
I P : n t w i nI [ Ioo J ·i / P /-->-
P ~ hew in~ [ rJJ 171 - > t_I
/1
,I
7 ~1
I ')f Uf Jt +w 11
c, n rr "'/• mt'cl /·n e i-11 Cf>-l
Jc-jS~eM .
,. cq·,n·
ff I l7) '
-11- - - - - - - - - - - - - - -- - - - - - -
- -------- --