aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/FirmwareSettingsDialog.ui
diff options
context:
space:
mode:
authorRayyan Ansari <rayyan@ansari.sh>2024-04-16 23:06:44 +0100
committerRayyan Ansari <rayyan@ansari.sh>2024-04-16 23:39:22 +0100
commit5a852cb00d56342f7e013d0ca6e14b10a9c4b84c (patch)
treecfb3e0920f98a90988156e33d970b7f4bec45e7d /src/frontend/qt_sdl/FirmwareSettingsDialog.ui
parent95adc87f6d32b83ab8f242d1278b8d1fd7d85624 (diff)
ROMManager: optimise ROMIcon function
Precompute all 16 5-bit RGB palette colours into 8-bit RGBA to avoid repeated and superfluous calculation within the nested loop at the point of index lookup. A speedup was observed, from ~7ms, to a consistent 1ms (i.e. now practically instantaneous) through timing with std::chrono::high_resolution_clock. Also improve comprehensibility, by using meaningful names, where appropriate, for loop counter variables.
Diffstat (limited to 'src/frontend/qt_sdl/FirmwareSettingsDialog.ui')
0 files changed, 0 insertions, 0 deletions