This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package atlas_packer | |
import "core:runtime" | |
Node :: struct { | |
child: [2]^Node, | |
pos: [2]uint, | |
size: [2]uint, | |
full: bool, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package radix | |
/* | |
NOTE: | |
This radix implementation requires a slice of uniformly signed integers, either all negative or all positive. | |
There is a check for type being unsigned, because most likely you do not want to sort a slice of negative numbers. | |
In case you do - you can remove that check. | |
In non-optimized build radix sort is more or less the same speed as default sort for 64bit integers. | |
In optimized build radix sort is twice as fast as default sort for 64bit integers (on my computer). |