A
3,5 GHz


Hybrid sort method
combining Merge sort bottom-up & Counting sort towers
algorithms @ 24bit color quantization

Use Counting sort criterion:
log2[n] / (log2[log2[n/2]] + log2[TM/TC]) ≥ 1

Image resolution
(pixels)

Reduce palette  (colors)

Total Time
(milliseconds)

Memory
(MB)

Hybrid
calls
Merge
sort

 

Hybrid
calls
Counting
sort

 

Merge
sort
Improved
(%)

Counting
sort
Improved
(%)

Hybrid 

Merge

Count

H

M

C

SD
414.720

4

76

76

111

32

4

32

3

0

0

46

16

134

134

293

32

4

32

15

0

0

119

64

191

191

618

32

4

32

63

0

0

224

256

229

229

1.268

32

4

32

255

0

0

454

2K
2.211.840

4

131

413

131

32

16

32

0

3

215

0

16

351

750

363

32

16

32

1

14

114

3

64

649

1.062

804

32

16

32

29

34

64

24

256

948

1.353

1.771

32

16

32

206

49

43

87

4K
8.847.360

4

202

1.782

202

64

64

64

0

3

782

0

16

519

3.240

519

64

64

64

0

15

524

0

64

1.145

4.531

1.160

64

64

64

1

62

296

1

256

2.208

5.768

2.546

64

64

64

81

174

161

15

8K
33.177.600

4

489

6.594

489

128

256

128

0

3

1248

0

16

1.193

12.161

1.193

128

256

128

0

15

919

0

64

2.301

17.253

2.301

128

256

128

0

63

650

0

256

4.287

21.993

4.287

128

256

128

0

255

413

0

 

15.053

77.530

18.056

 

 

 

654

690

415

20

table 3
(source: www.spartalis.gr/sort)