Re:J40: Independent, self-contained JPEG XL decoder
by bjourne on Sunday September 18, 2022 @04:18PM
(#32891103)
Since the library is distributed as an 8k long header file, doesn't compilation times explode?
[ Parent
| on HN ]
Re:J40: Independent, self-contained JPEG XL decoder
by lifthrasiir on Sunday September 18, 2022 @05:11PM
(#32891557)
Most lines of j40.h are only enabled with `#define J40_IMPLEMENTATION`, which should be defined only once.
Re:J40: Independent, self-contained JPEG XL decoder
by bjourne on Sunday September 18, 2022 @05:49PM
(#32891817)
Hm, yes, but it still 8k source and, afaik, it will be needlessly recompiled whenever the object file that includes it is modified.
Re:J40: Independent, self-contained JPEG XL decoder
by lifthrasiir on Sunday September 18, 2022 @05:59PM
(#32891884)
Including j40.h more than once does nothing. So it can only affect the preprocessing phase, but windows.h is multiple times larger than J40 (even after `#define WIN32_LEAN_AND_MEAN`) and if you can `#include <windows.h>` anywhere J40 can't be a real problem.