Efficient Go
Book information
Description
Software engineers today typically put performance optimizations low on the list of development priorities. But despite significant technological advancements and lower-priced hardware, software efficiency still matters. With this book, Go programmers will learn how to approach performance topics for applications written in this open source language. How and when should you apply performance efficiency optimization without wasting your time? Authors Bartlomiej Plotka and Frederic Branczyk provide the tools and knowledge you need to make your system faster using fewer resources. Once you learn how to address performance in your Go applications, you'll be able to bring small but effective habits to your programming and development cycle. This book shows you how to Continuously monitor for performance and efficiency regressions Find the root cause of performance bottlenecks using metrics, logging, tracing, and profiling Use tools like pprof, go test, benchstat and k6.io to create reliable micro- and macro-benchmarks Improve and optimize your code to meet your goals without sacrificing simplicity and readability Make data-driven decisions by prioritizing changes that make a difference Introduce basic "performance hygiene" in day-to-day Go programming and testing 1. Software Efficiency Matters Motivation For This Book Behind Performance Common Performance Misconceptions Optimized Code is Not Readable You Aren’t Going to Need It (YAGNI) Hardware is Getting Faster and Cheaper We Can Scale Horizontally Instead Time to Market is More Important Be Vigilant to Simplifications Efficiency: The Key to Pragmatic Code Performance Summary 2. Efficient Introduction to Go Basics You Should Know About Go Imperative, Compiled and Statically Typed Language Designed to Improve Serious Codebases Governed by Google, Yet Open Source Simplicity, Safety and Readability are Paramount Packaging and Modules Dependencies Transparency by Default Consistent Tooling Single Way of Handling Errors Strong Ecosystem Unused Import or Variable Causes Build Error Unit Testing and Table Tests Advanced Language Elements Code Documentation as a First Citizen Backwards Compatibility and Portability Go Runtime Object Oriented Programming in Go Is Go “Fast”? Summary 3. Conquering Efficiency Beyond Waste, Optimization is a Zero-Sum Game Reasonable Optimizations Deliberate Optimizations Optimization Challenges Understand Your Goals Efficiency Requirements Should be Formalized Resource Aware Efficiency Requirements Acquiring and Assessing Efficiency Goals Got a Performance Problem? Keep Calm! Optimization Design Levels Efficiency-Aware Development Flow Functionality Phase Efficiency Phase Summary 4. How Go Uses The CPU Resource (or Two) CPU in a Modern Computer Architecture Assembly Understanding Go Compiler CPU and Memory Wall Problem Hierachical Cache System Pipelining and out-of-order execution Hyper-threading Schedulers Operating System Scheduler Go Runtime Scheduler Practical Example of Concurrency in Go Summary 5. How Go Uses Memory Resource Memory Relevance Do we Have a Memory Problem? Physical Memory OS Memory Management Virtual Memory mmap Syscall OS Memory Mapping Go Memory Management Values, Pointers and Memory Blocks Go Allocator Garbage Collection The Three R’s Optimization Method Summary About the Author
Similar books
Efficient Go: Data-Driven Performance Optimization
2022 · PDF
Efficient Go: Data-Driven Performance Optimization
2023 · EPUB
Efficient Go (for lipped prom)
2022 · EPUB
Efficient Go
2022 · EPUB
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF