12 comments (12 comments)0 reactions (0 reactions)0 assignees (0 assignees)Go19,008 forks (19,008 forks)batch import
Performancehelp wanted
Repository metrics
- Stars
- 133,883 stars (133,883 stars)
- PR merge metrics
- No merged PRs in 30d (No merged PRs in 30d)
Description
According to a profiling data from a large number of servers at Google, time.Time.Sub is within the top 150 functions by CPU time. The current implementation of Sub is not inlineable. The logic for Sub is not particularly complicated and I believe it can be made to be inlined with some love.
Contributor guide
- Research direction
- Study the current implementation of time.Time.Sub in the Go source code, understand why it is not inlineable (e.g., complexity, calls to non inlineable functions), and experiment with refactoring to make it inlineable. Benchmark the optimized version against the original.
- Tech stack
- go
- Domain
- backend
- Issue type
- Performance
- Prerequisites
- Gocompiler inlining heuristics