From 8dbf29e86e984e9de87ad0724a99cab89f2d8ea6 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 9 Sep 2008 12:44:41 +0000 Subject: Performance optimisations: In-line expressions are faster than function calls --- libs/web/luasrc/template.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/web/luasrc/template.lua') diff --git a/libs/web/luasrc/template.lua b/libs/web/luasrc/template.lua index 4aa9b0933a..dc6e5bb7dd 100644 --- a/libs/web/luasrc/template.lua +++ b/libs/web/luasrc/template.lua @@ -63,7 +63,7 @@ function compile(template) -- Search all <% %> expressions local function expr_add(ws1, skip1, command, skip2, ws2) - table.insert(expr, command) + expr[#expr+1] = command return ( #skip1 > 0 and "" or ws1 ) .. "<%" .. tostring(#expr) .. "%>" .. ( #skip2 > 0 and "" or ws2 ) -- cgit v1.2.3