如果它的希望落空,就会再次检索值,并重做递增计算。
If it is wrong, it has to fetch the value again and redo the increment computation.
由于这些指标永远都是递增的,所以必须事先确定一个基准,再根据它计算出之后的差量。
Because these metrics perpetually increment, you must take a baseline before and calculate the difference afterward.
在计数器的示例中,冒险的步骤是递增——它检索旧值并在旧值上加一,希望在计算更新期间值不会变化。
In the case of the counter, the speculative step is the increment — it fetches and adds one to the old value in the hopes that the value will not change while the update is being computed.
应用推荐