# Searchsortedlast performance

**URL:** <https://discourse.julialang.org/t/searchsortedlast-performance/72711>\
**Category:** Performance\
**Tags:** interpolations, sorting\
**Created:** [December 7, 2021, 1:58pm UTC](https://discourse.julialang.org/t/searchsortedlast-performance/72711 "2021-12-07T13:58:36Z")\
**Posts on this page:** 4\
**Page:** 3

<div class="post-metadata">

**Author:** ![davibarreira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davibarreira/32/20270_2.png) [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Post date:** [December 9, 2021, 6:53pm UTC](https://discourse.julialang.org/t/searchsortedlast-performance/72711/41 "2021-12-09T18:53:33Z")

</div>

So what is the verdict? Is Numba indeed consistently outperforming Julia even after the code optimization?

---

<div class="post-metadata">

**Author:** ![snowgum](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@snowgum](https://discourse.julialang.org/u/snowgum)\
**Post date:** [December 9, 2021, 7:25pm UTC](https://discourse.julialang.org/t/searchsortedlast-performance/72711/42 "2021-12-09T19:25:37Z")

</div>

The verdict is that the improved Julia version is always faster than numba. For the original choice of parameters the speeds are very close, Julia about 7% faster. For other combinations, Julia can be faster by several factors. Julia is better for smaller `xs`, presumably because numba has some overhead that is more noticeable for shorter loops.

---

<div class="post-metadata">

**Author:** ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)\
**Post date:** [December 9, 2021, 7:33pm UTC](https://discourse.julialang.org/t/searchsortedlast-performance/72711/43 "2021-12-09T19:33:57Z")

</div>

BTW, on hacker news they call this ´nerd sniping´ Julia;)

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 9, 2021, 9:57pm UTC](https://discourse.julialang.org/t/searchsortedlast-performance/72711/44 "2021-12-09T21:57:23Z")

</div>

Perhaps you can adapt the title accordingly?

[Previous page](https://discourse.julialang.org/t/searchsortedlast-performance/72711.md?page=2)
