heuristic for song length determination

song length calculation of lorge.fur now takes 18ms (from ~1 hour)
This commit is contained in:
tildearrow 2025-11-09 20:42:38 -05:00
parent 61ac87d505
commit 9e8c97cc6f
6 changed files with 53 additions and 14 deletions

View file

@ -264,6 +264,19 @@ double DivEngine::benchmarkSeek() {
return tAvg;
}
double DivEngine::benchmarkWalk() {
std::chrono::high_resolution_clock::time_point timeStart=std::chrono::high_resolution_clock::now();
// benchmark
calcSongTimestamps();
std::chrono::high_resolution_clock::time_point timeEnd=std::chrono::high_resolution_clock::now();
double t=(double)(std::chrono::duration_cast<std::chrono::microseconds>(timeEnd-timeStart).count())/1000000.0;
printf("[RESULT] %fs\n",t);
return t;
}
void DivEngine::notifyInsChange(int ins) {
BUSY_BEGIN;
for (int i=0; i<song.systemLen; i++) {