Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Go Performans Rehberi
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Oğuzhan
July 25, 2020
Technology
350
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go Performans Rehberi
https://gophercon.ist/
için hazırladığım sunum
Oğuzhan
July 25, 2020
More Decks by Oğuzhan
See All by Oğuzhan
Yazılımda Ustalaşmak
oguzhan
0
130
Kuşbakışı GO
oguzhan
2
410
Hayatınızı Değiştirecek 10 Araç (Hosting Meetup)
oguzhan
0
810
MaestroPanel HTK
oguzhan
0
89
Other Decks in Technology
See All in Technology
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
170
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
510
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
110
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.5k
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
450
家のリアーキテクト・リファクタリング
suguruooki
0
150
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.9k
安心して変更できるWebフロントエンドの作り方
pirosikick
4
2.2k
おい、エージェントを使って終わらせろ
nwiizo
0
210
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
720
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
310
10分で知る最近のOmarchy
komagata
0
310
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
RailsConf 2023
tenderlove
30
1.5k
The Curse of the Amulet
leimatthew05
2
14k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
GraphQLとの向き合い方2022年版
quramy
50
15k
Crafting Experiences
bethany
1
330
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
How GitHub (no longer) Works
holman
316
150k
Optimizing for Happiness
mojombo
378
71k
Transcript
Oğuzhan Yılmaz Go Performans Rehberi
min. Go 1.14
if > switch
13.5 ns/op 15.5 ns/op
12.1 ns/op
strconv > fmt
BenchmarkStrconv-16 19381725 67.5 ns/op 32 B/op 1 allocs/op BenchmarkFmt-16 5839038
222 ns/op 72 B/op 3 allocs/op 67.5 ns/op
make([]int, 0, 10) > []int{}
BenchmarkMakeSliceWithCap-16 1000000000 0.234 ns/op 0 B/op 0 allocs/op BenchmarkMakeSlice-16 65739
17390 ns/op 16376 B/op 11 allocs/op 0.234 ns/op
strings.Builder > “a” + “b”
BenchmarkStringBuildNaive-16 6573120 174 ns/op 32 B/op 6 allocs/op BenchmarkStringBuildBuilder-16 19740784
62.4 ns/op 64 B/op 1 allocs/op 62.4 ns/op
bytes.Replace > strings.Replace bytes Concat > strings Concat bytes Concat
> strings Join
70.1 ns/op BenchmarkBytesReplace-4 20000000 70.1 ns/op 32 B/op 1 allocs/op
BenchmarkStringsReplace-4 10000000 132 ns/op 64 B/op 2 allocs/op
https://github.com/valyala/fasthttp
binary.BigEndian.PutUint32 > binary.Write
1075 ns/op 113 ns/op
sync.Pool
None
_ = make([]byte, 10<<30)
runtime.MemProfileRate = 0 https://golang.org/pkg/runtime/
syscal.SYS_MMAP
None
map[int]int{} > map[string]int{}
3 ms/op
json.Marshal(Struct) > json.Marshal(Map)
BenchmarkMarshallStruct-16 4721078 230 ns/op 64 B/op 2 allocs/op BenchmarkMakeSlice-16 1843551
665 ns/op 512 B/op 10 allocs/op 230 ns/op
Atomic > Mutex
BenchmarkIncrementMutex-16 87149690 12.3 ns/op 0 B/op 0 allocs/op BenchmarkIncrementMutexNoDefer-16 99812758
12.2 ns/op 0 B/op 0 allocs/op BenchmarkIncrementAtomic-16 286304998 4.19 ns/op 0 B/op 0 allocs/op BenchmarkConcurrentMutex-16 226051 5104 ns/op 16 B/op 1 allocs/op BenchmarkConcurrentMutexNoDefer-16 235743 4941 ns/op 16 B/op 1 allocs/op BenchmarkConcurrentAtomic-16 260210 4635 ns/op 16 B/op 1 allocs/op 4.19 ns/op
1. https://github.com/dgryski/go-perfbook/blob/master/performance.md 2. https://stephen.sh/posts/quick-go-performance-improvements 3. https://hashrocket.com/blog/posts/go-performance-observations 4. https://gist.github.com/vitalyisaev2/5791627ffc48f10c2fde22c2a5dd32ee