| ▲ | espetro 2 days ago | |
Nice article Andrii. I see from previous articles <https://blog.andr2i.com/posts/2026-06-22-optimization-catalo...> that you can identify and validate bottlenecks which you can optimize. For more general Go practitioners like me, is there any harness/tooling I can bring into my projects to identify these bottlenecks (aside from profiling if any). More specifically, tooling that identifies workflows that actually have greater changes to be fine with 'unsafe'. | ||
| ▲ | molecularman 4 hours ago | parent [-] | |
Thanks! Good question, I don't think such a tool exists. Such a tool would require a mathematical proof of an invariant that all the accesses are in bounds. The closest thing is the compiler's own bounds-check elimination proof engine. It eliminates the check when it can prove the checks aren't necessary and sometimes you can help it with hints like `_ = b[i+3]`. But then you don't need unsafe at all, which is the point: unsafe is the last resort. | ||