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

Make some small style/effciency improvements #12

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

jlapeyre
Copy link
Contributor

@jlapeyre jlapeyre commented Apr 8, 2020

  • Use mutating eigvals! to avoid an allocation.
  • Add comment on reason for promotion.
  • Use fill rather than ones. This is cleaner and more efficient.

Although these changes include improvements in efficiency, I found no measurable difference
in run time. It's more a question of best practices. Eg, you should avoid an allocation
if it doesn't make the code less readable.

I meant to include these in the previous PR, but they escaped somehow.

* Use mutating eigvals! to avoid an allocation.
* Add comment on reason for promotion
* Use `fill` rather than `ones`. This is cleaner and more efficient.
@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #12 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #12   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files           2        2           
  Lines          33       33           
=======================================
  Hits           32       32           
  Misses          1        1           
Impacted Files Coverage Δ
src/char-values.jl 96.87% <100.00%> (ø)

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 2e7ae9e...fe81a24. Read the comment docs.

@matthewware
Copy link
Collaborator

LGTM. Thanks again John!

@matthewware matthewware merged commit 6c5c806 into BBN-Q:master Apr 8, 2020
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.

None yet

2 participants