Module:Sandbox/Ahecht/benchmark

This is an old revision of this page, as edited by Ahecht (talk | contribs) at 13:29, 31 March 2022 (string). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}

function p.ustring(frame)
	for i = 1, 1000000 do 
		mw.ustring.match(" abcde ",'%S')
	end
	return "done"
end

function p.string(frame)
	for i = 1, 1000000 do 
		string.match(" abcde ",'%S')
	end
	return "done"
end

return p