go-timer
go-timer copied to clipboard
Why is faster than standard library?
Any benchmark and proof?
😀 Benchmarks are working in progress, according my historical tests, when goroutines expand about to 5k-1w, the lib has a lesser time diff and lesser resources usage. The performance consideration is partial reason to create the lib, mostly to provide some easier method and patterns for async handler scene. If you are interested about it, welcome to PR for tests or features.
只是相对于标准库少了一些NewTimer和NewTicker的调用。如果对精度有要求,比如10ms或者1ms.这种。定时任务量大可以用,因为Timer的调用量固定. 否则感觉有点鸡肋。始终没解决linux下time.Timer的高CPU使用
@FJSDS 我自己是放在C10K/M的场景使用的,心跳、同步这些,量级会大一些