Yes, you are correct, if the template is only {{}}'s with no text then
there is no benefit, but no penalty, either (i.e., no down side in
performance). Once there is any reasonable amount of text (as all
templates I have written are), the speed up is noticeable.
-Paul
On Mon, Jul 11, 2016 at
1ms = 100ns. According to *Many results there is no gain.
понедельник, 11 июля 2016 г., 22:27:47 UTC+3 пользователь Paul Borman
написал:
>
> I was looking at text/template/parse/lex.go and noticed it seemed to be
> very inefficient in how it searched for {{ in its input. I rewrote lexText