effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Rebalance benchmarks

Open phischu opened this issue 10 months ago • 3 comments

  • [ ] Prevent iterate_increment from being constant-folded
  • [ ] Prevent factorial_accumulator from being constant-folded
  • [ ] Change input sizes to more evenly distribute time
  • [ ] Make input sizes round numbers
  • [x] Add generator
  • [x] Add handler sieve
  • [ ] Add checkpointing

phischu avatar Feb 07 '25 17:02 phischu

@mattisboeckle it would be great if you could figure out why iterate_increment and factorial_accumulator are constant-folded (in the llvm backend), and how we can cheaply prevent this (perhaps by using different arithmetic operations involving a magical modulus?)

phischu avatar Apr 16 '25 09:04 phischu

@mattisboeckle it would be great if you could figure out why iterate_increment and factorial_accumulator are constant-folded (in the llvm backend), and how we can cheaply prevent this (perhaps by using different arithmetic operations involving a magical modulus?)

I was able to prevent constant folding in the mentioned programs by doing a modulo operation on the iteration parameter, which llvm does not seem to be able to analyze.

mattisboeckle avatar Apr 18 '25 13:04 mattisboeckle

I've adjusted the magic mod value to 2^63-1 and added a comment explaining, why we do this.

mattisboeckle avatar May 02 '25 11:05 mattisboeckle