Benchmarker - A Good Friend for Performance

4,336 views

Published on

(Pycon mini JP 2011 LightningTalk)
About benchmark utility for Python.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,336
On SlideShare
0
From Embeds
0
Number of Embeds
94
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Benchmarker - A Good Friend for Performance

  1. 1. PyCon mini JP 2011 Lightning TalkBenchmarkera good friend for performance makoto kuwata http://www.kuwata-lab.com/
  2. 2. Profile @makotokuwata http://www.kwuata-lab.com/ Perl is the Ruby/PHP/Python programmer CHAMPION! Creator of Erubis (*) Python4PHPer (*) default template engine on Rails 3
  3. 3. Question
  4. 4. Which is faster? https://gist.github.com/800384
  5. 5. Benchmark + op is the fastest for short stringsplus op 0.624sec format 0.887sec join 0.709sec 0 0.2 0.4 0.6 0.8 1 second per million
  6. 6. Which is faster? https://gist.github.com/801429
  7. 7. Benchmark Not Same!+= op 0.431sec= & + 0.439sec 0 0.1 0.2 0.3 0.4 0.5 second per million
  8. 8. Which is faster? https://gist.github.com/801429
  9. 9. Benchmark += op 0.545sec= and + Too Slow! Unmeasurable! 0 0.4 0.8 1.2 1.6 2 second per million
  10. 10. Why?
  11. 11. [OT] Python v.s. Perl
  12. 12. [OT] Python v.s. Perl Perl is AWESOME!
  13. 13. About Benchmarker
  14. 14. Benchmarker Benchmarking utility for Python A good friend for performance http://pypi.python.org/pypi/Benchmarker/
  15. 15. Example Code
  16. 16. Output
  17. 17. Remove same fot-stmt
  18. 18. Repeat all benchmarks Remove min & max results
  19. 19. Command-line Options
  20. 20. thank you

×