Android Benchmark Results for gcc 4.6 Optimization

About

The results in this page indicate the effects of gcc O3 optimization, which was conducted by comparing four cases: gcc 4.6 default (O2 for arm files and Os for thumb files), O3 enabled for arm files only, O3 enabled for both arm and thumb files and O3 for both arm and thumb files, plus -fno-inline-functions BP

strict-aliasing is found disabled for thumb files by default in Bug #822113. It is supposed to gain some extra speed if strict-aliasing applies. The results are also listed here for reference.

The Android is based on linaro_android_2.3.4. The tool chain is based on toolchain-4.6-2011.07

Methodology

The test method is the same as Android Toolchain Benchmark

skia results

NOTE: smaller numbers are better

histogram

TEST

skia-gcc-default

skia-gcc-O3-arm-only

skia-gcc-O3-arm-thumb

skia-gcc-O3-no-inline

skia-gcc-strict-aliasing

decode_4444_(null)

0.00

0.00

0.00

0.07

0.00

decode_565_(null)

0.00

0.00

0.00

0.00

0.00

decode_8888_(null)

0.00

0.00

0.00

0.00

0.00

repeatTile_index8

151.93

152.33

150.80

151.53

152.00

repeatTile_4444

194.20

194.33

193.67

192.87

193.40

repeatTile_565

125.20

125.67

125.13

125.40

125.20

repeatTile_8888

152.53

151.67

151.00

151.13

151.33

bitmap_index8

66.87

66.87

66.60

66.67

66.73

bitmap_index8_A

135.73

134.93

135.27

135.40

135.13

bitmap_4444

58.00

57.87

57.80

57.80

57.80

bitmap_4444_A

123.67

123.33

123.87

123.80

123.47

bitmap_565

127.53

127.33

127.73

127.87

127.53

bitmap_8888

25.00

24.73

24.87

24.93

24.73

bitmap_8888_A

80.07

79.33

79.80

79.33

79.27

polygon

119.27

119.40

120.27

120.07

119.27

lines

34.07

34.20

34.40

34.60

34.07

points

7.47

7.67

7.80

7.67

7.73

rrects3

13.33

13.40

13.80

13.73

13.40

rrects1

42.33

42.27

42.53

42.80

42.20

ovals3

14.53

14.53

14.73

14.73

14.67

ovals1

48.87

49.00

49.27

49.67

49.27

rects3

1.40

1.33

1.27

1.33

1.27

rects1

9.00

9.00

8.87

9.07

8.87

python results

NOTE: smaller numbers are better

Histogram View of Results

TEST

python-gcc-default

python-gcc-O3-arm-only

python-gcc-O3-arm-thumb

python-gcc-O3-no-inline

python-gcc-strict-aliasing

BuiltinFunctionCalls

512

526

518

505

515

BuiltinMethodLookup

383

383

383

382

382

CompareFloats

367

368

368

367

368

CompareFloatsIntegers

371

337

338

337

371

CompareIntegers

398

399

399

399

398

CompareInternedStrings

414

415

415

414

414

CompareLongs

354

354

355

354

354

CompareStrings

335

336

335

335

335

CompareUnicode

337

337

338

337

337

ComplexPythonFunctionCalls

500

495

502

498

502

ConcatStrings

660

652

736

604

669

ConcatUnicode

548

554

592

516

556

CreateInstances

559

558

557

552

559

CreateNewInstances

424

424

427

411

425

CreateStringsWithConcat

417

424

412

413

415

CreateUnicodeWithConcat

347

346

361

329

347

DictCreation

262

261

261

260

259

DictWithFloatKeys

358

358

358

356

360

DictWithIntegerKeys

350

348

355

351

351

DictWithStringKeys

336

337

340

336

335

ForLoops

329

330

332

330

330

IfThenElse

305

306

306

305

305

ListSlicing

446

446

451

449

446

NestedForLoops

387

388

388

387

387

NestedListComprehensions

538

551

544

534

540

NormalClassAttribute

422

422

422

422

422

NormalInstanceAttribute

374

373

375

373

371

PythonFunctionCalls

405

405

407

405

404

PythonMethodCalls

580

581

584

574

578

!Recursion

558

559

558

554

557

SecondImport

682

695

671

672

687

SecondPackageImport

704

718

686

685

709

SecondSubmoduleImport

855

872

819

830

841

SimpleComplexArithmetic

336

337

337

336

336

SimpleDictManipulation

376

377

377

377

376

SimpleFloatArithmetic

388

388

388

388

387

SimpleIntFloatArithmetic

289

291

295

290

290

SimpleIntegerArithmetic

290

291

295

290

292

SimpleListComprehensions

476

485

479

473

478

SimpleListManipulation

321

321

323

321

321

SimpleLongArithmetic

371

374

370

372

379

SmallLists

453

458

467

453

461

SmallTuples

430

429

429

421

429

SpecialClassAttribute

416

416

416

415

416

SpecialInstanceAttribute

485

490

467

481

467

StringMappings

391

393

396

390

391

StringPredicates

404

407

407

407

406

StringSlicing

467

502

504

403

469

TryExcept

391

392

392

391

391

TryFinally

456

457

457

459

456

TryRaiseExcept

440

436

435

443

444

TupleSlicing

392

399

394

371

395

UnicodeMappings

560

561

562

559

560

UnicodePredicates

434

434

434

438

434

UnicodeSlicing

437

465

493

406

447

WithFinally

593

587

589

587

586

WithRaiseExcept

561

559

566

565

556

!Totals

24974

25104

25166

24611

24999

gnugo

NOTE: smaller numbers are better

Toolchain

Time (in seconds)

gnugo-gcc-default

95.02

gnugo-gcc-O3-arm-only

94.68

gnugo-gcc-O3-arm-thumb

94.71

gnugo-gcc-O3-no-inline

95.30

gnugo-gcc-strict-aliasing

94.54

gcstone results

histogram NOTE: smaller numbers are better

TEST

gcstone-gcc-default

gcstone-gcc-O3-arm-only

gcstone-gcc-O3-arm-thumb

gcstone-gcc-O3-no-inline

gcstone-gcc-strict-aliasing

Total Array Alloc Time

62

67

131

66

65

Total Array GC Time

20

18

14

26

23

Total List Alloc Time

3302

3390

3238

3474

3405

Total List GC Time

610

609

607

606

608

cximage

NOTE: smaller numbers are better

Toolchain

Time (in seconds)

cximage-gcc-default

32.21

cximage-gcc-O3-arm-only

32.04

cximage-gcc-O3-arm-thumb

31.64

cximage-gcc-O3-no-inline

32.17

cximage-gcc-strict-aliasing

32.09

size

size

gcc-default

gcc-O3-arm-only

gcc-O3-arm-thumb

gcc-O3-no-inline

gcc-strict-aliasing

system.tar.bz2

39046025

39132630

41216812

40643624

39103909

ChaoYang/Sandbox/gccoptimization (last modified 2011-08-24 23:38:55)