pixel icon indicating copy to clipboard operation
pixel copied to clipboard

Benchmarks

Open faiface opened this issue 7 years ago • 0 comments

Benchmarks are incredibly useful when optimizing performance. They are also useful when we want to tell people how much we improved the performance of the library (for example: "The performance of drawing primitive shapes was improved by 80%", sounds good).

Technology

  • We'll use the standard "testing"
  • Each benchmark should be located in the same folder as the functionality it's benchmarking
  • Related benchmarks should be located together in a single appropriately named file
  • Benchmark files should have a different package than the functionality they're benchmarking (pixe -> pixel_test)

What to benchmark

Here's the list so far. Will most likely expand.

  • [x] Pixel
    • [x] ToRGBA
    • [x] All Matrix operations
    • [x] Sprite drawing to Batch
  • [x] IMDraw
    • [x] All IMDraw drawing operations (circle, line, etc.) separately for different number of points (i.e. don't use b.N as the number of points, but as the number of repeated drawings)
  • [x] Text
    • [x] Creating Atlas from several different rune sets (small, large)
    • [x] Writing text (by small chunks, by large chunks, b.N should be the number of chunks, not their size)

faiface avatar Jun 05 '17 18:06 faiface