Skip to content

ImpactSort is the efficient unstable sorting algorithm.

License

Notifications You must be signed in to change notification settings

ghostproxies/impactsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImpactSort

ImpactSort

Table of Contents

Introduction

ImpactSort is the efficient unstable sorting algorithm.

It's an in-place insertionsort and shellsort derivative that's intended to replace sorting algorithms with the fastest speed for a majority of array lengths when both the specific distribution of presorted elements isn't predictable and the presorted order of duplicate elements isn't relevant.

Furthermore, it has simple implementation, no auxiliary subarrays and no vendor-specific SIMD.

Author

ImpactSort was created by William Stafford Parsons as a product of GhostProxies.

License

ImpactSort is licensed with the BSD-3-Clause license.

The default phrase the copyright holder in the 3rd clause is replaced with GhostProxies.

Reference

C Implementation

impactsort.c

The impactsort function sorts an array of elements in ascending order without preserving the presorted order of duplicate elements.

elements_length must be the count of elements in the elements array.

The integral type of element must match the integral type of each element in the elements array.

C# Implementation

impactsort.cs

The ImpactSort function sorts an array of elements in ascending order without preserving the presorted order of duplicate elements.

The integral type of element must match the integral type of each element in the elements array.

Go Implementation

impactsort.go

The ImpactSort function sorts an array of elements in ascending order without preserving the presorted order of duplicate elements.

The integral type of element must match the integral type of each element in the elements array.

Speed

ImpactSort was benchmarked and refined extensively during development with varying architectures, compilers, compiler optimization settings, devices, programming languages and sorting scenarios.

The result was 1st-place speed rankings that are likely consistent across a majority of implementations compared to competing algorithms such as heapsort, mergesort, quicksort, radixsort and shellsort.

It's still being benchmarked and refined for further speed improvements wherever possible.

About

ImpactSort is the efficient unstable sorting algorithm.

Resources

License

Stars

Watchers

Forks