Skip to content

Conversation

@vm-001
Copy link
Owner

@vm-001 vm-001 commented Jan 9, 2024

Summary:

Try to remove the metatable.

before removed:

RADIX_ROUTER_ROUTES=100000 RADIX_ROUTER_TIMES=10000000 luajit benchmark/simple-variable.lua
========== variable ==========
routes  :       100000
times   :       10000000
elapsed :       1.841541 s
QPS     :       5430234
ns/op   :       0.1841541 ns
path    :       /1/foo
handler :       1
Memory  :       109.89 MB

after removed:

RADIX_ROUTER_ROUTES=100000 RADIX_ROUTER_TIMES=10000000 luajit benchmark/simple-variable.lua
========== variable ==========
routes  :       100000
times   :       10000000
elapsed :       1.511881 s
QPS     :       6614277
ns/op   :       0.1511881 ns
path    :       /1/foo
handler :       1
Memory  :       109.48 MB

The memory usage is basically the same

@vm-001 vm-001 marked this pull request as draft February 26, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants