V: QuickSort reinvented - beating most implementations in pure C by a significant margin

Created on 3 Jun 2020  路  2Comments  路  Source: vlang/v

For those hungry after speed, I'd recommend recent observation why finally "correctly" implement QuickSort (in pure C - without any assembly - with very short code base - about 3x as minimal quicksort - but leveraging modern CPU pipelines), despite being unstable, still matters and why MergeSort/HeapSort (and their variants - e.g. quadsort) can't beat it for primitive values/types:

https://github.com/gerben-s/quicksort-blog-post/blob/master/blog.md

(note the linked quadsort above seems still slower than the mergesort implemented in the above-linked blog post)

Feature Request

Most helpful comment

@penguindark @ka-weihe just pinging as I've noticed you were interested in optimizations (regex, hash map, ...)

All 2 comments

@penguindark @ka-weihe just pinging as I've noticed you were interested in optimizations (regex, hash map, ...)

Very interesting! Tnx :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shouji-kazuo picture shouji-kazuo  路  3Comments

medvednikov picture medvednikov  路  3Comments

ArcDrake picture ArcDrake  路  3Comments

cjmxp picture cjmxp  路  3Comments

jtkirkpatrick picture jtkirkpatrick  路  3Comments