在我的桌面计算机上,一百万次迭代需要大约 12 秒钟才能完成。
On my desktop machine, one million iterations takes about 12 seconds to complete. The pooling code avoids the allocation of the MyClass object within the loop
比如,您的需求是您的系统支持每秒一百万次的点击和两秒以内的响应时间。
For example, suppose one of the requirements is that your system be able to support a million hits a second and a two-second response time.
“如果你扔一百万次硬币,”他说,“一定有连续出现20次正面的时候。”
"If you have a million coin flips," he says, "it's almost certain that somewhere in those coin flips there will be 20 heads in a row."
应用推荐