>>353 をテンプレートでやってみたんだけど、ちょっと不思議なことが。

template<int N> struct Fib { enum { value = Fib<N-1>::value + Fib<N-2>::value }; };
template<> struct Fib<0> { enum { value = 2 }; };
template<> struct Fib<1> { enum { value = 3 }; };

int fibfunc(int n) { return n<=0 ? 2 : ( n==1 ? 3 : fibfunc(n-1)+fibfunc(n-2) ); }

int main(int argc, char* argv[]) {
const intn = 40;
printf("%d\n", Fib<n>().value);
printf("%d\n", fibfunc(n));
return 0;
}

VC++6.0SP6 Win2k
これをビルド(Releaseモードでリビルド)するのは1秒もかからないのに、fibfunc関数の結果が表示されるは3〜4秒かかりました。
結果は両方とも同じ値でした。
計算をコンパイルタイムにやる方が速いのは何故ですか?