在每一个实例下,我运行一个简单的程序,测定循环调用一个方法10,000,000次所需的运行时间,我调用了同步和非同步两个版本,并比较了结果。
In each case, I ran a simple program that measured the run time of a loop calling a method 10,000,000 times, calling both a synchronized and an unsynchronized version, and compared the results.
synchgc类型表示同步gc,它是从头到尾连续运行的gc循环;即,不与应用程序交错运行。
A synchgc type represents a synchronous gc, which is a gc cycle that ran uninterrupted from beginning to end; that is, interleaving with the application didn't happen. These can occur for two reasons.
应用推荐