As soon as you implement a nontrivial class maintaining state between method calls, consumers of the class will want to know details about thread safety and performance.
一旦您实现了在方法调用之间保持状态的重要类,该类的使用者就会希望了解有关线程安全和性能的详细信息。
One final comment about OSR: it is usually only a performance problem in benchmarking, when programmers are lazy and put everything in a single method such as main.
关于OSR的最后一点提示:通常,只有程序员很懒惰,把所有东西都放在一个方法(比如main)中时,它才会给基准测试带来性能问题。
At the same time, I've lost track of the number of developers I've met who complain about accessor method performance.
同时,我已记不清曾有多少开发人员抱怨访问器方法的性能了。
应用推荐