[erlang-questions] trading systems
Alpar Juttner
ajuttner.list@REDACTED
Fri Oct 2 08:11:27 CEST 2009
> > Why? I interviewed with a hedge fund. They use templates extensively
> > and it makes sense. Partial template specialization is just the
> > ticket to optimize generic code at compile time.
> Templates can drastically inflate code size
It doesn't true today, due to inlining and optimization. Consider for
example 'std::vector<int> a;'. If you hane look at the header file you
will see that a single statement like 'a[5]=12;' results in a tremendous
amount of (nested) function calls. But the optimizer will reduce it to
same machine code as the corresponding C expression would result in.
> and cause an extra
> indirection at function call time.
I cannot even guess what do you mean by "extra indirection".
Regards,
Alpar
More information about the erlang-questions
mailing list