wwbmmm commented on PR #2918: URL: https://github.com/apache/brpc/pull/2918#issuecomment-2732451853
我觉得问题的根本原因是编译器对TLS变量访问的优化,而不是内联优化,所以使用BAIDU_GET_VOLATILE_THREAD_LOCAL,是更根本的改法。 如果要区分一个函数内是一次调用还是多次调用,来使用不同的改法,这样维护成本会比较高。未来随着代码的改动,调用次数可能会发生变化,最好还是采用一种统一的改法。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org