User Tools

Site Tools


base:sprite_multiplexer_sorting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

base:sprite_multiplexer_sorting [2015-04-17 04:34] – external edit 127.0.0.1base:sprite_multiplexer_sorting [2022-04-12 10:45] (current) icepic
Line 19: Line 19:
   * The Ocean sort performs lousy (bubbesort like) for pure random patterns, and extremly bad for extreme values   * The Ocean sort performs lousy (bubbesort like) for pure random patterns, and extremly bad for extreme values
  
-  * The bucket sort performs pretty stable most of the time, and is thus useable for typical ingame patterns (only 18% slower than the Ocean sort in the Java version). In fact, the ingame performace should (with some tuning and ASM code)) be able to perform nearly as good as the Ocean sort. A lot of further code optimization is possible. In Java one of the problems is the lack of a proper "byte" representation (had to use integers). So a puer assembly implementation will make a lot of difference in terms of performance. Further, the code can be optimized bigtime if a fixed BUCKET size is used. I found 128 buckets to perform best overall. Note that the memory usage for this sorting algorithm is very low.+  * The bucket sort performs pretty stable most of the time, and is thus useable for typical ingame patterns (only 18% slower than the Ocean sort in the Java version). In fact, the ingame performace should (with some tuning and ASM code)) be able to perform nearly as good as the Ocean sort. A lot of further code optimization is possible. In Java one of the problems is the lack of a proper "byte" representation (had to use integers). So a pure assembly implementation will make a lot of difference in terms of performance. Further, the code can be optimized bigtime if a fixed BUCKET size is used. I found 128 buckets to perform best overall. Note that the memory usage for this sorting algorithm is very low.
  
   * The Ocean-Bucket sort may be the best compromise. It eleminates all the lousy performance problems with the Ocean sort, and the kick ass ingame performance remains mostly unaffected.   * The Ocean-Bucket sort may be the best compromise. It eleminates all the lousy performance problems with the Ocean sort, and the kick ass ingame performance remains mostly unaffected.
base/sprite_multiplexer_sorting.txt · Last modified: 2022-04-12 10:45 by icepic