diff options
| author | dam <dam@gudinoff> | 2023-08-19 02:15:34 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2023-08-19 02:15:34 +0100 |
| commit | 1c6b84fb34a0dd18020f153b2d6cbd5e4f741319 (patch) | |
| tree | 195b66de36617f0eca9f579b34889dadbe4c68f6 /ttt.jai | |
| parent | cb5b475a28a9ef5ecbdfc317814464cbf1cf09c1 (diff) | |
| download | task-time-tracker-1c6b84fb34a0dd18020f153b2d6cbd5e4f741319.tar.zst task-time-tracker-1c6b84fb34a0dd18020f153b2d6cbd5e4f741319.zip | |
Testing performance.
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 96 |
1 files changed, 49 insertions, 47 deletions
@@ -471,32 +471,32 @@ update_total_times :: (db: *Database) { // memset(totals.data, 0, db.total_times.count * size_of(s64)); // memset(db.total_times.data, 0, size_of(type_of(db.total_times))); - for xpto: 1..50 { + for xpto: 1..100 { start := current_time_monotonic(); for * total : db.total_times { <<total = 0; } - - // ns/entry - // LLVM 14.5 - // X64 132.4 + + // I5-2550K R3550H (ns/entry) + // LLVM 14.5 5.0 + // X64 132.4 124.4 // - // totals: []s64 = db.total_times; - // for db.tasks { - // times : []s64 = it.times; - // totals[0] = add(totals[0], times[0]); - // totals[1] = add(totals[1], times[1]); - // totals[2] = add(totals[2], times[2]); - // totals[3] = add(totals[3], times[3]); - // totals[4] = add(totals[4], times[4]); - // totals[5] = add(totals[5], times[5]); - // totals[6] = add(totals[6], times[6]); - // } + totals: []s64 = db.total_times; + for db.tasks { + times : []s64 = it.times; + totals[0] = add(totals[0], times[0]); + totals[1] = add(totals[1], times[1]); + totals[2] = add(totals[2], times[2]); + totals[3] = add(totals[3], times[3]); + totals[4] = add(totals[4], times[4]); + totals[5] = add(totals[5], times[5]); + totals[6] = add(totals[6], times[6]); + } - // ns/entry - // LLVM 11.2 - // X64 119.9 + // I5-2550K R3550H (ns/entry) + // LLVM 11.2 11.7 + // X64 119.9 124.5 // for db.tasks { for *total: db.total_times { @@ -505,40 +505,42 @@ update_total_times :: (db: *Database) { } - // ns/entry - // LLVM 11.5 - // X64 126.6 + // I5-2550K R3550H (ns/entry) + // LLVM 11.5 12.1 + // X64 126.6 132.8 // - // for db.tasks { - // times : []s64 = it.times; - // for *total: db.total_times { - // <<total = add(<<total, times[it_index]); - // } - // } + for db.tasks { + times : []s64 = it.times; + for *total: db.total_times { + <<total = add(<<total, times[it_index]); + } + } - // ns/entry - // LLVM 11.8 - // X64 134.4 + // I5-2550K R3550H (ns/entry) + // LLVM 11.6 11.2 + // X64 132.3 133.8 // - // totals: []s64 = db.total_times; - // for db.tasks { - // times : []s64 = it.times; - // for 0..totals.count-1 { - // totals[it] = add(totals[it], times[it]); - // } - // } + for db.tasks { + times : []s64 = it.times; + for 0..db.total_times.count-1 { + db.total_times[it] = add(db.total_times[it], times[it]); + } + } + - // ns/entry - // LLVM 11.6 - // X64 132.3 + // I5-2550K R3550H (ns/entry) + // LLVM 11.8 10.2 + // X64 134.4 132.5 // - // for db.tasks { - // times : []s64 = it.times; - // for 0..db.total_times.count-1 { - // db.total_times[it] = add(db.total_times[it], times[it]); - // } - // } + totals: []s64 = db.total_times; + for db.tasks { + times : []s64 = it.times; + for 0..totals.count-1 { + totals[it] = add(totals[it], times[it]); + } + } + // unroll_week :: (code: string) -> string { // builder: String_Builder; |
