Performance/WhatToTest

From Adobe Open Source Wiki
Revision as of 05:11, 2 June 2008 by ChrisCox (Talk | contribs)

Jump to: navigation, search

Contents


What things need to be tested as part of this benchmark?

Fundamental Concepts

Most of these can't easily be tested.

  • regular types
  • basic math
  • basic flow control
  • dereference (pointer/iterator is a regular type that can be dereferenced)
  • type conversion
    • performance of type conversions (known to be a problem on certain compilers)

Language Concepts

  • abstraction
  • inheritance
  • function calls
  • exceptions
  • rtti
  • function objects
  • template instantiation
  • constructors
    • Are empty constructors correctly optimized away?

Simple Idioms

These are building blocks, with more than one way to express them. These are commonly reused things, usually found in headers like "inlines.h", "math_utils.h", etc.

  • swap
  • absolute value
  • min/max
  • switch versus if/else trees
  • pin values to range (max, min combo)
  • rotate bits
  • byte order reversal
  • round up/down
  • round float to int
  • thresholding
  • pointer alignment tests and comparisons

Complex Idioms

  • hand coded memcpy, memmove, memset, memcmp
    • simple types and user defined types
    • arrays and containers
  • safe bool cast from a smart pointer
  • convolution
    • 1D and 2D
  • matrix multiplication
  • min/max of a sequence
  • summation of a sequence
  • sorting a sequence
  • reversing a sequence
  • rotating members of a sequence
  • find/search sequence
  • lookup tables
  • interleave/deinterleave buffers
  • transpose block
  • rotate a block +- 90 and 180 degrees
  • histogram building
  • stack like operations
  • bitarrays and manipulations of them
  • complex type and template

Runtime and Library Support

  • allocation / deletion
    • new, delete
    • malloc, free
  • mathlib
  • string manipulation routines
    • strcpy, strchr, strcat, etc.
  • memory routines
    • memcpy, memmove, memset, memcmp, etc.

More Complex Stuff

  • STL containers
  • STL algorithms
  • iostreams

Optimizations

Need to test as many as possible. And this list deserves it's own page.

Conformance to Specification

  • user specified swap in STL algorithms
  • short circuit evaluation of boolean expressions
  • growth policies and complexities of STL containers

Language Extensions

Other ?