# The Prospero Challenge

**URL:** <https://discourse.julialang.org/t/the-prospero-challenge/127342>\
**Category:** Performance\
**Created:** [March 25, 2025, 11:58am UTC](https://discourse.julialang.org/t/the-prospero-challenge/127342 "2025-03-25T11:58:39Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![sgaure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sgaure/32/14779_2.png) [@sgaure](https://discourse.julialang.org/u/sgaure)\
**Post date:** [March 27, 2025, 10:43am UTC](https://discourse.julialang.org/t/the-prospero-challenge/127342/15 "2025-03-27T10:43:16Z")

</div>

I don’t know about GPUs, but on my CPU, using `ifelse` instead of `max` and `min` lead to significant performance improvements. `ifelse` produces `cmov` or `vmax/min` whereas `min` and `max` may produce `jmp` instructions which may cause pipeline stalls. Though, I’m not certain what `@fastmath` does with it, probably using `ifelse`.

---

_[View the full topic](https://discourse.julialang.org/t/the-prospero-challenge/127342)._
