Android gcc 4.6 Optimization O2 & O3 comparison

About

The results in this page compare the effects of O2 and O3 optimization. All the optimization related -f flags have been removed. The modules which set O2 internally are changed to O3 for gcc-O3-only build and the modules which set O3 internally are changed to O2 for gcc-O2-only build.

Methodology

The test method is the same as Android Toolchain Benchmark

skia results

NOTE: smaller numbers are better

histogram

TEST

skia-gcc-O2-only

skia-gcc-O3-only

decode_4444_(null)

0.00

0.00

decode_565_(null)

0.07

0.00

decode_8888_(null)

0.00

0.00

repeatTile_index8

151.33

150.73

repeatTile_4444

194.20

192.53

repeatTile_565

125.33

125.40

repeatTile_8888

151.27

150.93

bitmap_index8

66.40

66.67

bitmap_index8_A

136.13

135.13

bitmap_4444

58.00

57.93

bitmap_4444_A

123.87

123.27

bitmap_565

128.13

127.67

bitmap_8888

24.67

24.67

bitmap_8888_A

79.60

79.60

polygon

119.60

119.93

lines

34.33

34.27

points

7.73

7.80

rrects3

13.60

13.73

rrects1

42.60

42.53

ovals3

14.60

14.73

ovals1

49.20

49.13

rects3

1.33

1.27

rects1

9.00

8.87

python results

NOTE: smaller numbers are better

Histogram View of Results

TEST

python-gcc-O2-only

python-gcc-O3-only

BuiltinFunctionCalls

517

520

BuiltinMethodLookup

382

383

CompareFloats

367

367

CompareFloatsIntegers

337

337

CompareIntegers

398

398

CompareInternedStrings

414

414

CompareLongs

354

354

CompareStrings

336

335

CompareUnicode

337

337

ComplexPythonFunctionCalls

498

499

ConcatStrings

687

745

ConcatUnicode

518

599

CreateInstances

562

562

CreateNewInstances

431

427

CreateStringsWithConcat

433

412

CreateUnicodeWithConcat

345

363

DictCreation

260

259

DictWithFloatKeys

357

360

DictWithIntegerKeys

354

347

DictWithStringKeys

333

337

ForLoops

330

330

IfThenElse

305

305

ListSlicing

448

446

NestedForLoops

387

387

NestedListComprehensions

545

545

NormalClassAttribute

422

421

NormalInstanceAttribute

373

374

PythonFunctionCalls

406

404

PythonMethodCalls

582

577

!Recursion

562

557

SecondImport

711

672

SecondPackageImport

732

690

SecondSubmoduleImport

879

818

SimpleComplexArithmetic

336

336

SimpleDictManipulation

378

378

SimpleFloatArithmetic

388

387

SimpleIntFloatArithmetic

292

293

SimpleIntegerArithmetic

292

294

SimpleListComprehensions

478

479

SimpleListManipulation

321

321

SimpleLongArithmetic

371

369

SmallLists

448

463

SmallTuples

429

428

SpecialClassAttribute

414

417

SpecialInstanceAttribute

467

466

StringMappings

392

395

StringPredicates

406

406

StringSlicing

491

508

TryExcept

391

391

TryFinally

456

456

TryRaiseExcept

446

445

TupleSlicing

390

397

UnicodeMappings

559

561

UnicodePredicates

434

433

UnicodeSlicing

448

498

WithFinally

592

589

WithRaiseExcept

556

569

!Totals

25078

25166

gnugo

NOTE: smaller numbers are better

Toolchain

Time (in seconds)

gnugo-gcc-O2-only

95.08

gnugo-gcc-O3-only

94.84

gcstone results

histogram NOTE: smaller numbers are better

TEST

gcstone-gcc-O2-only

gcstone-gcc-O3-only

Total Array Alloc Time

128

129

Total Array GC Time

15

14

Total List Alloc Time

3487

3191

Total List GC Time

617

606

cximage

NOTE: smaller numbers are better

Toolchain

Time (in seconds)

cximage-gcc-O2-only

32.17

cximage-gcc-O3-only

32.12

size

size

gcc-O2-only

gcc-O3-only

system.tar.bz2

38363769B

41013971B

ChaoYang/Sandbox/gcc-o2-o3 (last modified 2011-08-24 23:46:35)