tech
Go High-Performance Programming EP7: Use singleflight To Merge The Same Request
Go High-Performance Programming EP7: Use singleflight To Merge The Same Request. Using cached database data to accelerate queries is common in developing b。
tech
Go High-Performance Programming EP7: Use singleflight To Merge The Same Request. Using cached database data to accelerate queries is common in developing b。
tech
Go高性能编程 EP7: 使用 SingleFlight 合并相同的请求. 在开发业务代码过程中,我们经常会使用缓存DB数据的方式来加速查询,这样的架构会有一个问题,我们常常需要解决缓存穿透、缓存雪崩和缓存击穿问题。缓存击穿问题是指,在平常高并发的系统中,大量的请求同时查询一个 key 时,如果这个 key。
tech
Introduction The primary mission of Golang is to simplify asynchronous programming. When faced with operations requiring batch processing and lengthy execution times, traditional single-threaded execution becomes cumbersome, prompting the need for asynchronous parallel processing. This article introduces some tips for asynchronous programming in Golang. This article was first published
tech
本文译文深入剖析了gRPC这款高性能RPC框架的不足,详细讨论了其陡峭的学习曲线、过度复杂的接口设计、不完善的HTTP/2兼容性、延迟的HTTP/3支持、JSON映射局限及大消息处理难题,帮助开发者全面认识并探讨gRPC优化改进的可能方向。
tech
在Go语言中进行性能优化时,首先需要了解当前的性能表现。通过使用Go语言标准库中的测试框架来进行基准测试,可以了解函数的执行速度、内存分配次数等指标,并使用`b.N`属性控制测试次数、`benchtime`控制测试时间等参数来提高测试的准确度。
tech
Golang High-Performance Programming EP4 : reflect. reflect provides Go with the ability to dynamically obtain the types and values of objects at runtime an。
tech
Go高性能编程 EP4: 反射. reflect 为 Go 语言提供了运行时动态获取对象的类型和值以及动态创建对象的能力。反射可以帮助抽象和简化代码,提高开发效率。Go 语言标准库以及很多开源软件中都使用了 Go 语言的反射能力,例如用于序列化和反序列化的 json 、ORM 框架 gorm/xorm 等。本。
tech
Go高性能编程 EP6: 异步编程的技巧. Golang最大的使命就是简化异步编程,当我们遇到那种需要批量处理且耗时的操作时,传统的单线程执行就显得吃力,这时就会想到异步并行处理。本篇文章介绍一些Golang异步编程的技巧。 This article was first published in the Me。
tech
Golang High-Performance Programming EP3 : Memory Alignment. All examples in this article use a MacBook Pro M1, a 64-bit architecture CPU. This is the third。
tech
Go高性能编程EP3: 内存对齐. 本文写作所有的例子以 macbookpro M1 为例,该CPU为64位架构 本文是Go语言高性能编程第三篇,分析了为什么需要内存对齐,Go语言内存对齐的规则,以及实际例子中内存对齐的使用,最后分享了两个工具,帮助我们在开发过程中发现内存对齐问题。 This article。
tech
Golang High-Performance Programming EP2: Reduce The Size Of Executable Binary Files With upx. We all know that Golang has a significant feature: its compil。
tech
探索如何通过使用UPX和Go编译器选项来显著减小Go语言编译生成的可执行二进制文件的大小。了解去除调试信息的技巧,以及UPX的压缩效果,将原本6.5M的文件压缩至1.4M,节省高达80%的存储空间。本文为追求高效和精简的Go程序员提供实用方法,掌握优化技巧,提升开发效率!