Skip to content

Conversation

@blishko
Copy link
Collaborator

@blishko blishko commented Sep 3, 2025

Description

Previously, exprToSMT and writeBytes were creating unnecessary temporary structures for processing numbers and bytestrings. However, Haskell libraries offer a way to process these directly.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@blishko blishko requested a review from msooseth September 3, 2025 14:48
@blishko blishko force-pushed the make-write-bytes-more-efficient branch 2 times, most recently from b1251ce to dfc7a4d Compare September 5, 2025 14:11
In writeBytes, there is no need to unpack bytestring into a list in order to fold it.
Also, we don't have to call `exprToSMT` to translate index and byte into
a bitvector. Thus, `wrap` can be pure.

Similarly, when translating literals, we can also directly translate the
value, without unnecessary conversion.
@blishko blishko force-pushed the make-write-bytes-more-efficient branch from dfc7a4d to fba55d0 Compare September 5, 2025 20:45
Copy link
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

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

Oh, this is really nice!

@msooseth msooseth merged commit b6d7cfa into main Sep 8, 2025
7 checks passed
@msooseth msooseth deleted the make-write-bytes-more-efficient branch September 8, 2025 14:45
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.

3 participants