AOP Benchmark

xiaoxiao2021-03-06  41

AOP Benchmark

1, performance test AOP or proxy framework

(1) byte frame frame

l askAPECTWERKZ 1.0

l askectwerkz 2.x

l askECTJ 1.2

l JBoss AOP 1.0

(2) Proxy framework

l Spring AOP 1.1.1

l CGLIB Proxy 2.0.2

l Dynaop 1.0beta

(3) AspectWerkz can expand the Aspect container

l askAPECTJ

l AOP Alliance

l Spring AOP

2, performance test results

AWBENCH (NS / Invocation)

Aspect

Werkz2.x

awProxy

Aspect

Werkz1.0

Aspectj

JBoss

Spring

Dynaop

CGLIB

EXT:

Aopalliance

EXT:

Spring

EXT:

Aspectj

Before, args () Target ()

10

25

606

10

220

355

390

145

-

220

-

Around x 2, args () target ()

80

85

651

50

290

436

455

155

465

476

-

BEFORE

15

20

520

15

145

275

320

70

-

40

10

Before, Static Info Access

30

30

501

25

175

275

330

70

35

Before, RTTI Info Access

50

55

535

50

175

275

335

75

35

After returbin

10

20

541

10

135

285

315

85

-

45

15

After throwing

3540

3870

6103

3009

5032

6709

8127

-

3460

Before After

20

30

511

20

160

445

345

80

-

35

20

Before, Args () Primitives

10

20

555

10

195

350

375

145

210

Before, args () Objects

5

25

546

10

185

325

345

115

200

around

60

95

470

10

225

315

75

-

90

Around, RTTI INFO Access

70

70

520

50

140

250

340

80

70

70

-

Around, Static Info Access

80

90

486

25

135

245

330

75

80

80

-

The following table is used as the reference criteria in AspectWerkz 2.0.rc2-snapshot:

AWBENCH (Relative%)

Aspect

Werkz2.x

awProxy

Aspect

Werkz1.0

Aspectj

JBoss

Spring

Dynaop

CGLIB

EXT:

Aopalliance

EXT:

Spring

EXT:

Aspectj

Before, args () Target ()

1 x

2.5 x

60.6 x

1 x

22 x

35.5 x

39 x

14.5 x

-

22 x

-

Around x 2, args () target ()

1 x

1 x

8.1 x

0.6 x

3.6 x

5.4 x

5.6 x

1.9 x

5.8 x

5.9 x

-

BEFORE

1 x

1.3 x

34.6 x

1 x

9.6 x

18.3 x

21.3 x

4.6 x

-

2.6 x

0.6 x

Before, Static Info Access

1 x

1 x

16.7 x

0.8 x

5.8 x

9.1 x

11x

2.3 x

1.1 x

Before, RTTI Info Access

1 x

1.1 x

10.7 x

1 x

3.5 x

5.5 x

6.7 x

1.5 x

0.7 x

After returbin

1 x

2 x

54.1 x

1 x

13.5 x

28.5 x

31.5 x

8.5 x

-

4.5 x

1.5 x

After throwing

1 x

1 x

1.7 x

0.8 x

1.4 x

1.8 x

2.2 x

-

0.9 x

Before After

1 x

1.5 x

25.5 x

1 x

8x

22.2 x

17.2 x

4x

-

1.7 x

1 x

Before, Args () Primitives

1 x

2 x

55.5 x

1 x

19.5 x

35 x

37.5 x

14.5 x

21 x

Before, args () Objects

1 x

5x

109.2 x

2 x

37 x

65 x

69 x

23 x

40 x

around

1 x

1.5 x

7.8 x

0.1 x

3.7 x

5.2 x

1.2 x

-

1.5 x

Around, RTTI INFO Access

1 x

1 x

7.4 x

0.7 x

2 x

3.5 x

4.8 x

1.1 x

1 x

1 x

-

Around, Static Info Access

1 x

1.1 x

6 x

0.3 x

1.6 x

3x

4.1 x

0.9 x

1 x

1 x

-

Test Environment: Java Hotspot 1.4.2, Windows 2000 SP4, Pentium M 1.6 GHz, 1 g RAM

转载请注明原文地址:https://www.9cbs.com/read-78551.html

New Post(0)