1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-17 13:25:20 +03:00

Lua: All usage of double converted to float (#4502)

* Lua: All usage of double converted to float. printf("%f") still uses promotion to double, (floating point va_args are always promoted to double)
Speed improvements:
 * reordering of rotable to put most used tables at the top
 * caching of last found global table
Use real pointer to rotable instead of misusing void* to pass integer value
Lua internal traces now turned on by TRACE_LUA_INTERNALS cmake option

* Replaced floating point division with multiplication (where possible), the hardware FPU is much faster at multiplication vs division.
stb_image: enabled STBI_NO_HDR and STBI_NO_LINEAR (removes code that we don't need)
This commit is contained in:
Damjan Adamic 2017-02-26 12:59:39 +01:00 committed by Bertrand Songis
parent 3b149a22d1
commit a1a58ad8f8
16 changed files with 129 additions and 107 deletions

View file

@ -813,7 +813,7 @@ int cliDisplay(const char ** argv)
else if (!strcmp(argv[1], "dc")) {
DiskCacheStats stats = diskCache.getStats();
uint32_t hitRate = diskCache.getHitRate();
serialPrint("Disk Cache stats: w:%u r: %u, h: %u(%0.1f%%), m: %u", stats.noWrites, (stats.noHits + stats.noMisses), stats.noHits, hitRate/10.0f, stats.noMisses);
serialPrint("Disk Cache stats: w:%u r: %u, h: %u(%0.1f%%), m: %u", stats.noWrites, (stats.noHits + stats.noMisses), stats.noHits, hitRate*0.1f, stats.noMisses);
}
#endif
else if (toLongLongInt(argv, 1, &address) > 0) {