if (FALSE) {
lua_mode(profile = TRUE)
pointless_computation = lua_func(
"function()
local s = startval
for i = 1,10^8 do
s = math.sin(s)
s = math.exp(s^2)
s = s + 1
end
return s
end")
lua("startval = 100")
pointless_computation()
lua_mode(profile = FALSE)
prof = lua_profile()
}
Run the code above in your browser using DataLab