tarantool / tarantool/crud

Possible performance improvement

Open
#490 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Lua
Stars
43
Forks
17
Avg merge
28m
Merged PRs (30d)
2

Description

If run the benchmark from the repository with enabled jit.dump it may be observed that there are many trace abortions due to FNEW bytecode:

https://github.com/tarantool/crud/blob/5e13a8658f6d064697294bd5af6c3083e088ea69/crud/select/executor.lua#L143

https://github.com/tarantool/crud/blob/5e13a8658f6d064697294bd5af6c3083e088ea69/crud/compare/comparators.lua#L89

Rewriting this functions as locals to avoid their generation at each call may improve the performance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/performance/perf_test.lua and run the benchmark with jit.dump enabled. Inspect the function sites in crud/select/executor.lua around line 143 and crud/compare/comparators.lua around line 89, then compare the trace-abortion output and benchmark performance after the functions are made locals.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
performance
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.