我想測量我的方法在運行時執行中的性能速度,但我不確定我所做的是否真的測量了性能我的方法我想要或正在做其他事情。如果它測量的是我的方法的性能速度,而不是它的可靠性。我想測量性能速度的方法稱爲FFMulFast,它計算Galois Field(256)的兩個多項式部分的乘積。注意:我只會介紹與我的問題相關的代碼。 public class GaloaField {
// some fields h
我需要nanosec的當前時間。 作爲字符串"%.9f" % float_time它是1502872986.6536936 。最後你可以看到76。 如果我嘗試寫的同時,INT int(float_time*10**9),這將是15028729866536936 和96底。爲什麼?哪個是獲得納米格式的正確途徑? from time import time
float_time = time()
我實現了一個標準的快速排序算法,並在幾次運行中對它進行測試,並將運行時間存儲在一個數組中。 int max = 100;
int runs = 1000;
int[] arr = new int[max];
Long[] times = new Long[runs];
while(n < runs){
for(int i =0 ; i<max; i++){
arr
現在我正在爲角色製作技巧,我想添加冷卻時間,但我不知道如何設置時間,但我想我知道哪些變量它應該有: private long currentTime; <-- this is the actual cooldown
private long cooldownTime; <--- this is the time it must pass before its ready
private boo