Remove obsolete optimization TODO.

Modern compilers already optimize functions like puffs_base_load_u32le:
https://godbolt.org/g/uZ9xNa (clang)
https://godbolt.org/g/q5amWw (gcc)
This commit is contained in:
Nigel Tao committed 2017-09-23 11:03:51 +10:00
1 parent 1a28112ebd
commit 7aaa6f6222
4 files changed
+3 -15

No files matched your search

-4
View File
@@ -333,10 +333,6 @@ extern int printf(const char* __restrict __format, ...);
// inline attribute to guide optimizations such as inlining, to avoid the
// -Wunused-function warning, and we like to compile with -Wall -Werror.
// TODO: for puffs_base_load_u16be etc, look for (ifdef) the x86 architecture
// and cast the pointer? Only do so if a benchmark justifies the additional code
// path. Modern compilers might already generate good code.
static inline uint16_t puffs_base_load_u16be(uint8_t* p) {
return ((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0);
}
-4
View File
@@ -304,10 +304,6 @@ extern int printf(const char* __restrict __format, ...);
// inline attribute to guide optimizations such as inlining, to avoid the
// -Wunused-function warning, and we like to compile with -Wall -Werror.
// TODO: for puffs_base_load_u16be etc, look for (ifdef) the x86 architecture
// and cast the pointer? Only do so if a benchmark justifies the additional code
// path. Modern compilers might already generate good code.
static inline uint16_t puffs_base_load_u16be(uint8_t* p) {
return ((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0);
}