. . . "If s is a compile-time constant and you use templates (C++), the compiler will do all the necessary optimizations." .