Hello language_fan,
You have probably already noticed that there is always a tradeoff to
be made. Either you get smaller binaries and faster compilation times
or larger binaries and (perhaps) more efficient runtime performance.
Note that if the data structures are small, generating them takes ve
language_fan:
> Note
> that if the data structures are small, generating them takes very little
> time on modern 32/64-bit hardware. OTOH if you have tens of megabytes of
> binary data in your .exe, hard drives are a serious bottleneck.
You forget an important thing: If you generate things at
bearophile wrote:
(after a small discussion on IRC) Tuples may be used for similar purposes, but
fixed-sized arrays are simpler to use, simpler to define, and they don't induce
compilation/code bloat. (...)
What do you mean by that? So parametrizing a template with a static
array would cause
Fri, 02 Oct 2009 16:56:48 -0400, bearophile thusly wrote:
> A good purpose for compile-time functions is to pre-generate constant
> data structures, avoiding to waste time generating them at compile time.
> But currently creating fixed-sized arrays at compile time while possible
> is tricky (it's