Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use smaller Int types where possible #33

Merged
merged 2 commits into from
Oct 23, 2021
Merged

Conversation

nickrobinson251
Copy link
Owner

@nickrobinson251 nickrobinson251 commented Oct 23, 2021

Part of #9, to reduce memory

On main:

julia> using BenchmarkTools, PowerFlowData
[ Info: Precompiling PowerFlowData [dd99e9e3-7471-40fc-b48d-a10501125371]

julia> str = "raw/realistic30.raw";
julia> @btime parse_network($str);
  160.294 ms (692 allocations: 66.34 MiB)

julia> @btime parse_network($str);
  160.033 ms (692 allocations: 66.34 MiB)

this PR:

julia> @btime parse_network($str);
  151.472 ms (692 allocations: 58.67 MiB)

julia> @btime parse_network($str);
  156.626 ms (692 allocations: 58.67 MiB)

(i'm a little doubtful of the speed change, because we saw the opposite in #7 (comment) (although that was pre-#23), but total memory is reduced as expected).

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2021

Codecov Report

Merging #33 (718b30a) into main (0ea03c5) will decrease coverage by 0.36%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
- Coverage   91.32%   90.96%   -0.37%     
==========================================
  Files           3        3              
  Lines         173      166       -7     
==========================================
- Hits          158      151       -7     
  Misses         15       15              
Impacted Files Coverage Δ
src/types.jl 96.42% <ø> (ø)
src/parsing.jl 96.96% <0.00%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ea03c5...718b30a. Read the comment docs.

@nickrobinson251 nickrobinson251 merged commit 05000cb into main Oct 23, 2021
@nickrobinson251 nickrobinson251 deleted the npr/small-ints branch October 23, 2021 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants