Skip to content

Refactor bitwise ops on booleans and remove duplicated Set from BinOp - #4728

Merged
ajpotts merged 5 commits into
Bears-R-Us:masterfrom
jabraham17:simplify-bool-ops
Jul 24, 2025
Merged

ajpotts merged 5 commits into
Bears-R-Us:masterfrom
jabraham17:simplify-bool-ops

Conversation

@jabraham17

@jabraham17 jabraham17 commented Jul 21, 2025 •

Copy link
Copy Markdown
Contributor

This PR makes a few changes to how bitwise and boolean ops are computed in the arkouda server.

  • Since the order of operands to bitwise ops does not matter, by using a helper function doBoolBoolBitOp and only calling it with operands in the same order (always vector, scalar or vector, vector) we can save some compilation time
  • The same Set.set was being recreated all over the place to determine if an op was an operator. This PR refactors that set into a common place so it does not get instantiated for all the generic combinations.
  • Makes a similar transformation with Set.set for realOps

I consider this a general cleanup and consolidation of logic in BinOp/OperatorMsg, it also saves a little bit of time while compiling

@jabraham17
jabraham17 marked this pull request as ready for review July 21, 2025 21:34
@jabraham17
jabraham17 requested review from ajpotts and e-kayrakli July 21, 2025 22:29

@1RyanK 1RyanK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! One small question.

Comment thread src/BinOp.chpl Resolved
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 changed the title Refactor bitwise ops on booleans and remove Set from BinOp Refactor bitwise ops on booleans and remove duplicated Set from BinOp Jul 23, 2025
Comment thread src/BinOp.chpl Resolved
@ajpotts
ajpotts added this pull request to the merge queue Jul 24, 2025
Merged via the queue into Bears-R-Us:master with commit 8c34416 Jul 24, 2025
ajpotts pushed a commit that referenced this pull request Jul 25, 2025
…Op (#4728)

This PR makes a few changes to how bitwise and boolean ops are computed
in the arkouda server.

- Since the order of operands to bitwise ops does not matter, by using a
helper function `doBoolBoolBitOp` and only calling it with operands in
the same order (always `vector, scalar` or `vector, vector`) we can save
some compilation time
- The same `Set.set` was being recreated all over the place to determine
if an op was an operator. This PR refactors that set into a common place
so it does not get instantiated for all the generic combinations.
- Makes a similar transformation with `Set.set` for `realOps`

I consider this a general cleanup and consolidation of logic in
BinOp/OperatorMsg, it also saves a little bit of time while compiling

---------

Signed-off-by: Jade Abraham <[email protected]>
@jabraham17
jabraham17 deleted the simplify-bool-ops branch September 15, 2025 23: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.

4 participants