mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
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:
1 parent
1a28112ebd
commit
7aaa6f6222
4 files changed
+3
-15
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user