(perf) introduce perf test harness and refactor (#54)
Made a lot of backwards-compatible changes and simplifications to the code that I had wanted to do for a lot of time, while also keeping an eye in performance. The new changes improved overall performance on my limited, dev-machine-only, luajit-only tests.
Before:
```
$ luajit perf.lua
nil,string,empty,sequence,record,hybrid,recursive,meta,process,complex,big
0.054246,0.140177,0.149759,0.323062,0.441312,0.607064,0.296031,0.458631,0.105668,1.717528,2.047272
```
After:
```
$ luajit perf.lua
nil,string,empty,sequence,record,hybrid,recursive,meta,process,complex,big
0.036804,0.188984,0.099349,0.247425,0.342079,0.452339,0.203801,0.288931,0.169462,1.010763,1.616462
```
2022-03-18 12:44:36 +00:00
|
|
|
.PHONY: all dev gen check test perf
|
|
|
|
|
|
|
|
LUA := $(shell luarocks config lua_interpreter)
|
|
|
|
|
2022-02-08 21:56:03 +00:00
|
|
|
all: gen check test
|
|
|
|
|
|
|
|
dev:
|
|
|
|
luarocks install tl
|
2022-02-08 22:18:10 +00:00
|
|
|
luarocks install luacheck
|
|
|
|
luarocks install busted
|
2022-02-08 21:56:03 +00:00
|
|
|
|
|
|
|
gen:
|
|
|
|
tl gen inspect.tl
|
|
|
|
|
|
|
|
check:
|
|
|
|
luacheck inspect.lua
|
|
|
|
|
|
|
|
test:
|
|
|
|
busted
|
|
|
|
|
(perf) introduce perf test harness and refactor (#54)
Made a lot of backwards-compatible changes and simplifications to the code that I had wanted to do for a lot of time, while also keeping an eye in performance. The new changes improved overall performance on my limited, dev-machine-only, luajit-only tests.
Before:
```
$ luajit perf.lua
nil,string,empty,sequence,record,hybrid,recursive,meta,process,complex,big
0.054246,0.140177,0.149759,0.323062,0.441312,0.607064,0.296031,0.458631,0.105668,1.717528,2.047272
```
After:
```
$ luajit perf.lua
nil,string,empty,sequence,record,hybrid,recursive,meta,process,complex,big
0.036804,0.188984,0.099349,0.247425,0.342079,0.452339,0.203801,0.288931,0.169462,1.010763,1.616462
```
2022-03-18 12:44:36 +00:00
|
|
|
perf:
|
|
|
|
$(shell luarocks config lua_interpreter) perf.lua
|
|
|
|
|
2022-02-08 21:56:03 +00:00
|
|
|
|
|
|
|
|