in reply to Re^7: Why is const x const not a const?
in thread Why is const x const not a const?

I know that the array is there, but that doesn't convince me that those 100k scalars are built at compile time. There might just as well be a magic initializer attached to it that generates them at runtime, or at closure cloning time or whenever.

No matter how big I chose the number in the range, I can't see increased memory consumption at compile time, which is why i suspect they aren't created at compile time.

  • Comment on Re^8: Why is const x const not a const?

Replies are listed 'Best First'.
Re^9: Why is const x const not a const?
by ikegami (Patriarch) on Jan 24, 2012 at 07:07 UTC

    I know that the array is there, but that doesn't convince me that those 100k scalars are built at compile time

    I showed the array is created at compile-time.

    I showed that once the list is built, it's not freed.

    I showed through memory usage monitoring that the list is built at compile-time.

    Not sure what else you want.

    No matter how big I chose the number in the range, I can't see increased memory consumption at compile time, which is why i suspect they aren't created at compile time.

    What's your test? Are you mistakenly using for (CONST..CONST) instead of the range operator?