Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自行编译的xlua.dll和仓库下载的dll性能差2倍 #1181

Open
shengfeiyue opened this issue Jan 20, 2025 · 1 comment
Open

自行编译的xlua.dll和仓库下载的dll性能差2倍 #1181

shengfeiyue opened this issue Jan 20, 2025 · 1 comment

Comments

@shengfeiyue
Copy link

官方编译xlua.dll是什么环境,我自己编译的dll性能差的很大。
这是测试代码
local t = {}
for i = 1, 1000000, 1 do
table.insert(t, math.random(1, 100000))
end
local a = os.clock()
table.sort(t, function (a, b)
return a < b
end)
log("test lua sort ------------------------------------------------- " .. os.clock()-a)

local a = os.clock()
for i = 1, 1000000, 1 do
    load("function() return 1 < 2 end")
end
log("test lua load ------------------------------------------------- " ..  os.clock()-a)
@shengfeiyue
Copy link
Author

使用vs2017编译,解决了该问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant