This study examines the capacity of space-filling curves to maintain locality under stringent computational constraints, with a particular emphasis on structured spatial queries. We want to find out how well Hilbert and Z-order curves keep spatial proximity when the grid resolution is small to medium. We did tests on two-dimensional grids that were 32×32, 64×64, and 128×128. There were two types of queries: square (8×8) and rectangular (4×16). Three measures were used to determine locality: cluster count, max jump distance, and average neighbor locality. For each configuration, we took 200 randomized trials to improve reliability, resulting in a total of 2400 observations. Independent-samples t-test and Cohen’s d effect size were computed for all primary comparisons. Results show that Hilbert ordering reduces fragmentation for square queries, achieving cluster count reductions between 48.0% and 50.4% compared to Z-order (Cohen’s d >= 2.89; p<0.001 across all grid sizes). The Hilbert advantage decreases for elongated rectangular queries with reductions falling to 35.5-45.1% and effect sizes declining to d = 1.19-1.76. Crucially, cluster reduction differences across the three grid sizes exhibit a standard deviation of only 1.02 percentage points, proving empirical evidence of saturation beyond moderate resolutions. Z-order demonstrates consistent, scale-invariant behavior throughout. In addition to establishing query geometry as a significant moderating influence in locality performance, the study offers useful recommendations for curve selection in systems with limited resources.
Morajkar et al. (Sun,) studied this question.