Your SlideShare is downloading. ×
Profiling go code   a beginners tutorial
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Profiling go code a beginners tutorial

749
views

Published on

Published in: Technology, Spiritual

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

No Downloads
Views
Total Views
749
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Profiling Go code A beginners tutorial Go Stockholm Meetup #7 “High Performance Go” Dec 5th 2013 Samuel Lampa @smllmp +samuellampa saml.rilspace.org Developer at www.uppmax.uu.se, www.farmbio.uu.se, rilpartner.se
  • 2. Enable profiling: Standard way Not terribly user friendly :/
  • 3. … especially compared to python:
  • 4. But, thanks to this Guy at Canonical (Dave Cheney) ... ● ● dave.cheney.net twitter.com/davecheney
  • 5. … we can now enable profiling in a much easier way:
  • 6. How to run it
  • 7. How to run it
  • 8. How to run it
  • 9. Call graph as PDF, weighted by execution time
  • 10. A few more options ...
  • 11. Zoomable / Scrollable SVG in browser
  • 12. A few performance tricks for string processing...
  • 13. Version 1
  • 14. Version 2 – Table optimization
  • 15. Version 3 – Using bufio Scanner(), new in Go 1.2
  • 16. Version 4 – Using pointers for counters
  • 17. Performance improvement, version 1-4
  • 18. Creds goes to ... ● ● Roger Peppe, also at Canonical, for help with the optimizations, and the final optimized version! twitter.com/rogpeppe
  • 19. Learn more ● blog.golang.org/profiling-go-programs ● tinyurl.com/go-pprof-win (Using pprof on Windows) ● blog.cloudflare.com/recycling-memory-buffers-in-go ● saml.rilspace.org/moar-languagez-gc-content-in-pytho n-d-fpc-c-and-c Also, don't miss ● gplus.to/golangplus ● golangweekly.com
  • 20. Thank you!