Skip to content

Conversation

shumpohl
Copy link
Member

No description provided.

@shumpohl shumpohl requested a review from Nomos11 August 28, 2025 09:45

next_multiple_sp = sp.Piecewise(
(0, sp.Le(duration, 0)),
Copy link
Member Author

Choose a reason for hiding this comment

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

I compare the duration here directly. Is it faster to compare the integers? I did find a difference in my benchmarks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

(see comment in #925 )

Copy link

Test Results

    6 files  ±0      6 suites  ±0   7m 22s ⏱️ -1s
1 233 tests ±0  1 171 ✅ ±0   62 💤 ±0  0 ❌ ±0 
7 398 runs  ±0  7 026 ✅ ±0  372 💤 ±0  0 ❌ ±0 

Results for commit 0849652. ± Comparison against base commit a07a154.

Copy link
Collaborator

@Nomos11 Nomos11 left a comment

Choose a reason for hiding this comment

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

we can change the piecewise line if it's syntactically nicer, but for me it was slower in %timeit

@shumpohl
Copy link
Member Author

Oh, I don't think it is syntactically nicer. Just a bit shorter because the quanta do not need to be stored. The important part to me is to avoid non-descriptive variable names unless the meaning is clear in a given domain (loop indices, standardized physical or math notation)

@Nomos11
Copy link
Collaborator

Nomos11 commented Aug 28, 2025

completely agree with the variables; just meant the change from int to float in sp.Le which - it's probably that? - for me made it slower.

@Nomos11
Copy link
Collaborator

Nomos11 commented Aug 28, 2025

that wouldn't make much sense however since that's on evaluation and the instantiation was slower, so idk...

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