All Projects → DarkRoku12 → lua_sort

DarkRoku12 / lua_sort

Licence: MIT license
Lua pure sort algorithm based on lib_table.c (from LuaJIT 2.1.0)

Programming Languages

lua
6591 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to lua sort

algorithms
The All ▲lgorithms documentation website.
Stars: ✭ 114 (+442.86%)
Mutual labels:  sort, sorting-algorithms
Algorithms
Short explanations and implementations of different algorithms in multiple languages
Stars: ✭ 37 (+76.19%)
Mutual labels:  sort, sorting-algorithms
ShiftSort
Sorting algorithm quicker than MergeSort, and is adaptive and stable.
Stars: ✭ 39 (+85.71%)
Mutual labels:  sort, sorting-algorithms
SortingLab.jl
Faster sorting algorithms (sort and sortperm) for Julia
Stars: ✭ 20 (-4.76%)
Mutual labels:  sort, sorting-algorithms
Javascript
A repository for All algorithms implemented in Javascript (for educational purposes only)
Stars: ✭ 16,117 (+76647.62%)
Mutual labels:  sort, sorting-algorithms
ultra-sort
DSL for SIMD Sorting on AVX2 & AVX512
Stars: ✭ 29 (+38.1%)
Mutual labels:  sort, sorting-algorithms
Sorting-Algorithms
sorting algorithms in python
Stars: ✭ 15 (-28.57%)
Mutual labels:  sort, sorting-algorithms
data-structure-and-algorithm
Basic data structures, sorting algorithms, algorithms learning tools. 基本数据结构,排序算法,算法学习工具
Stars: ✭ 86 (+309.52%)
Mutual labels:  sort, sorting-algorithms
Algorithms Primer
A consolidated collection of resources for you to learn and understand algorithms and data structures easily.
Stars: ✭ 381 (+1714.29%)
Mutual labels:  sort, sorting-algorithms
Algods
Implementation of Algorithms and Data Structures, Problems and Solutions
Stars: ✭ 3,295 (+15590.48%)
Mutual labels:  sort, sorting-algorithms
Pretty Algorithms
🌊 Pretty, common and useful algorithms with modern JS and beautiful tests
Stars: ✭ 2,163 (+10200%)
Mutual labels:  sort, sorting-algorithms
Java
All Algorithms implemented in Java
Stars: ✭ 42,893 (+204152.38%)
Mutual labels:  sort, sorting-algorithms
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (+790.48%)
Mutual labels:  sort, sorting-algorithms
RainbowSorting
Python application to visualize sorting algorithms using RGB colours.
Stars: ✭ 45 (+114.29%)
Mutual labels:  sorting-algorithms
jsonfiddle
JSON Fiddling
Stars: ✭ 14 (-33.33%)
Mutual labels:  sort
Algorithm-Implementation
This is our effort to collect the best implementations to tough algorithms. All codes are written in c++.
Stars: ✭ 16 (-23.81%)
Mutual labels:  sorting-algorithms
interview-cookbook
A playground for learning DataStructures, Algorithms, and Object-Oriented Concepts.
Stars: ✭ 25 (+19.05%)
Mutual labels:  sorting-algorithms
Static-Sort
A simple C++ header-only library for fastest sorting of small arrays. Generates sorting networks on compile time via templates.
Stars: ✭ 30 (+42.86%)
Mutual labels:  sort
sublime-postcss-sorting
Sublime Text plugin to sort CSS rules content with specified order.
Stars: ✭ 19 (-9.52%)
Mutual labels:  sort
dsa
data structure and algorithm - examples and implementations
Stars: ✭ 13 (-38.1%)
Mutual labels:  sorting-algorithms

lua_sort

-- Copyright (C) 2017 - DarkRoku12

Lua pure sort algorithm based on lib_table.c (from LuaJIT 2.1.0)

lib_table_sort.c -> table.sort algorithm built-in in LuaJIT.

qsort_raw.lua -> Lua pure version sort algorithm (non-optimized)

qsort_op.lua -> Lua pure version sort algorithm (optimized)

qsort_test.lua -> To test if the algorithm works well.

qsort_bench.lua -> A benchmark comparating table.sort (Buil-in LuaJIT, but NYI) and the lua pure version.

test_all.lua -> Runs the check test and the benchmark test.

results.txt -> Results of running test_all.lua

Resume of results.txt:

Tested on: Windows 10 64-bits. Intel Core I7-4500U (4M Cache, up to 3.00 GHz) 8 GB RAM LuaJIT 2.1.0 Beta ( 32-Bits )

Notes: Only the lowest times are shown here. Ratio 1.5 means Lua pure sort runs 1.5 times faster than Built-in sort.

JIT ON:

Table Length Lua pure sort Built-in sort Ratio
1000 0.000000 secs 0.000000 secs NaN
200000 (2e5) 0.016000 secs 0.082000 secs 5.125
300000 (3e5) 0.016000 secs 0.159000 secs 9.937
1 million 0.085000 secs 0.552000 secs 6.494

JIT OFF:

Table Length Lua pure sort Built-in sort Ratio
1000 0.000000 secs 0.000000 secs NaN
200000 (2e5) 0.138000 secs 0.100000 secs 0.724
300000 (3e5) 0.212000 secs 0.160000 secs 0.754
1 million 0.793000 secs 0.561000 secs 0.707
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].