Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go Performans Rehberi
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
130
アリアドネの糸と、20年ごとの建て替え ── 長尾真『電子図書館』を、伊勢で読み直す / Rereading Makoto Nagao’s "Electronic Library" in Ise
ykiyota
0
100
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
190
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
110
AI時代だからこそ、スケールしないことをやろう
yutashigemura
1
110
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
230
「重なり」は迎える側がつくる ― 人もAIエージェントも歓迎するプロダクトエンジニアリング ―
go0517go
PRO
0
270
振り返りこそエンジニアの本領
negima
0
340
AIで仕事のやり方を変える
matsu7874
3
1k
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
630
10分で知る最近のOmarchy
komagata
0
130
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
230
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Practical Orchestrator
shlominoach
191
12k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
270
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Music & Morning Musume
bryan
47
7.4k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
510
Thoughts on Productivity
jonyablonski
76
5.4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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