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

Replace force with strict fields and nothunk test #2621

Merged
merged 1 commit into from
Apr 23, 2021

Conversation

Anviking
Copy link
Member

@Anviking Anviking commented Apr 23, 2021

Issue Number

ADP-630

Overview

  • remove force
  • Use strict record fields in LogState and FollowStats
  • Add a nothunks test for sanity

Comments

force didn't help. It might have made things worse.

Testing in ghci with :set +s and iterate (updateStats msg1) s0 !! 100000 we get:

  • With force -> (0.42 secs, 297,818,512 bytes)
  • No force -> (0.16 secs, 86,713,928 bytes)
  • No force but with strict record fields -> (0.09 secs, 74,874,224 bytes)

@Anviking Anviking force-pushed the anviking/ADP-630/strict-fields branch from 0d8aa68 to 5e04f5d Compare April 23, 2021 09:50
@Anviking Anviking self-assigned this Apr 23, 2021
Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

persuasive change!

`force` didn't help. It might have made things worse.

Testing in ghci with
`:set +s` and `iterate (updateStats msg1) s0 !! 100000` we get:
With force -> (0.42 secs, 297,818,512 bytes)
No force -> (0.16 secs, 86,713,928 bytes)
No force but with strict record fields -> (0.09 secs, 74,874,224 bytes)

So this commit simply uses strict record fields, instead.

And we also add nothunks tests as a sanity-check.
@Anviking Anviking force-pushed the anviking/ADP-630/strict-fields branch from ab8c341 to 5f403ae Compare April 23, 2021 10:00
@Anviking
Copy link
Member Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 23, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 8fed8ee into master Apr 23, 2021
@iohk-bors iohk-bors bot deleted the anviking/ADP-630/strict-fields branch April 23, 2021 11:08
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