# Ironic observation about \`sort\` and \`sortperm\` speed for "small integers" vs R

**URL:** <https://discourse.julialang.org/t/ironic-observation-about-sort-and-sortperm-speed-for-small-integers-vs-r/8715>\
**Category:** Performance\
**Tags:** sort, sortperm, r\
**Created:** [January 31, 2018, 11:24am UTC](https://discourse.julialang.org/t/ironic-observation-about-sort-and-sortperm-speed-for-small-integers-vs-r/8715 "2018-01-31T11:24:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)\
**Post date:** [January 31, 2018, 1:36pm UTC](https://discourse.julialang.org/t/ironic-observation-about-sort-and-sortperm-speed-for-small-integers-vs-r/8715/3 "2018-01-31T13:36:43Z")

</div>

I’ve also found the mismatch in performance in Julia between `sort` and `sortperm` to be quite puzzling. I never really understood how could `sort` be so much faster than `sortperm`. Are you making the case that a different default sorting algorithm should be used for `sort` and `sortperm`?

---

_[View the full topic](https://discourse.julialang.org/t/ironic-observation-about-sort-and-sortperm-speed-for-small-integers-vs-r/8715)._
