[Scummvm-devel] Conditionally compiling components (Was: Clarifying & cleaning configure's cross-compiling craziness)

yotam barnoy yotambarnoy at gmail.com
Thu May 5 10:55:50 CEST 2011


>
> qdm2 might be a contender:
>
> video/codecs/qdm2.cpp seems to contains huge tables. In particular tables with a total of 128k floats, i.e. 512kb. These tables seem to contain precomputed sine / cosine values. One could allocate those on the stack, I guess, but I wonder about them anyway -- at least on desktop pcs, just re-computing the (co)sine might be a lot faster than completely stuffing the CPU cache.
> However, since these are not const and not prepoulated, they should only take size on the heap, not in the binary.
>

Definitely. It's a huge waste of space.  They don't take up space in
the binary, but they waste precious memory even when QDM2 is not used.
They should all at the very least be moved to the heap.

Yotam




More information about the Scummvm-devel mailing list