queryverse / queryverse/Query.jl
Eval can be replaced by getfield in select
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Julia
- Stars
- 403
- Forks
- 48
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 6
Description
getfield would be more efficient than eval in getting the value of a variable/type here:
Toy example:
julia> using BenchmarkTools
julia> @btime getfield(Main, Symbol("Int"))
0.015 ns (0 allocations: 0 bytes)
Int64
julia> @btime eval(Symbol("Int"))
58.841 ns (0 allocations: 0 bytes)
Int64
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/table_query_macros.jl around line 75, where select currently uses eval, and compare it with the getfield lookup shown in the issue. Replace the slower lookup while preserving the existing result, then use the provided Julia benchmark example to verify the lookup is more efficient.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data, performance
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100