diff options
| author | dam <dam@gudinoff> | 2024-05-06 13:05:12 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2024-05-06 13:05:12 +0100 |
| commit | 27e3e029448cf2a80b24e6e212dee8cccda06987 (patch) | |
| tree | c15adfbdf326d4f1ba5de2c0e0223a2d635461aa /unused.jai | |
| parent | 65227c476071914b82720084a2a775b44e4de885 (diff) | |
| download | task-time-tracker-27e3e029448cf2a80b24e6e212dee8cccda06987.tar.zst task-time-tracker-27e3e029448cf2a80b24e6e212dee8cccda06987.zip | |
WIP : Improve performance of draw_user_interface.
Diffstat (limited to 'unused.jai')
| -rw-r--r-- | unused.jai | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -3,14 +3,19 @@ print(">%<", S64_MIN + delta, to_standard_error = true); // MEASURE PERFORMANCE { - #import "Basic"; - start := current_time_monotonic(); - // Code to measure. - stop := current_time_monotonic(); - print("Measured % ns.\n", to_nanoseconds(stop-start)); + dbg_average := 0; // DEBUG + dbg_count := 0; // DEBUG - // Cumulative average: - CA_n+1 = (x_n+1 + n*CA_n ) / (n + 1) + #import "Basic"; + + // Cumulative average: CA_n+1 = (x_n+1 + n*CA_n ) / (n + 1) + start := current_time_monotonic(); // DEBUG + // ...code to be measured... + stop := current_time_monotonic(); // DEBUG + dbg_sample := to_nanoseconds(stop-start); // DEBUG + dbg_average = (dbg_sample + dbg_count * dbg_average) / (dbg_count + 1); // DEBUG + dbg_count += 1; // DEBUG + print("Average % ns.\n", dbg_average); // DEBUG } // Memory allocator debugging. |
