Code Monkey home page Code Monkey logo

go-performance-code's Introduction

go-performance-code

This is Chen Yixiao's ppt at the 2020 gopher meet up in shenzhen.

Go性能优化之路

作者:陈一枭

说明:这是腾讯高级工程师陈一枭在2020年初于深圳gopher meet up为大家演讲的PPT,内容非常干!PPT为操作指南,zip压缩包则是示例demo,每一步都有!

目录:

  1. 何时性能优化
  2. 如何性能优化
  3. 性能优化实践

1.何时性能优化

  • 何时开始
  • 何时停止

2.如何性能优化

  • 基准---benchmark的使用
  • 分析工具:GODEBUG
  • 分析工具:go tool pprof
  • 分析工具:go tool trace
  • 优化
  • 校验

3.性能优化实践

  • 示例使用sync.pool复用对象
  • 使用成员变量复用对象
  • 写时复制代替互斥锁
  • 分区:减少共享数据结构争用
  • 避免包含指针结构体作为map的key
  • 使用string.Builder拼接字符串
  • 其他

go-performance-code's People

Contributors

first-giver avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.