Sienna-Platform / Sienna-Platform/InfrastructureOptimizationModels.jl

`get_value` downstream override performance

Open
#118 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Julia
Stars
1
Forks
0
Avg merge
8h 51m
Merged PRs (30d)
9

Description

I liked the solution of having get_value be @generated, but now due to EmulationModel details, instead of straight :(return getfield(store, $field)[$K(T, U)]), we have :(return get_data_field(store, Val($field))[$K(T, U)]) so downstream packages can override it. I suspect that messes with the @generated-ness. Also, Val(foo) is sometimes surprisingly expensive.

Look into the pre-compilation/performance impacts of this and decide if it's worthwhile (and feasible) to come up with something better.

Contributor guide

Open the contributing guide

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 at get_value and trace the EmulationModel path through get_data_field and Val($field), then compare generated-code behavior with and without the downstream override. Treat the work as complete when pre-compilation and runtime impacts have been measured and the feasibility of a better approach is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.