I did a quick check on the 3 methods for 20,000 entities. It's negligible on my machine :
Test1 = 1327ms
Test2 = 1322ms
Test3 = 1321ms
Graphics3D 800,600,32,1
Global PLAYER = CreatePivot()
Global CHECKpivot = CreatePivot()
Const Radius = 50
Const Radius2 = Radius * Radius
Const Number = 20000
For l = 1 To Number
tmp = CreatePivot( CHECKpivot )
PositionEntity tmp, Rand(-1000,1000 ), 0 , Rand(-1000,1000 )
Next
;test1
Test1 = MilliSecs()
For l = 1 To Number
CHECK = GetChild( CHECKpivot, l )
If Abs( EntityX( PLAYER ) - EntityX( CHECK ) ) < Radius
If Abs( EntityY( PLAYER ) - EntityY( CHECK ) ) < Radius
If Abs( EntityZ( PLAYER ) - EntityZ( CHECK ) ) < Radius
If EntityDistance( PLAYER, CHECK ) < radius
;do nothing
EndIf
EndIf
EndIf
EndIf
Next
Test1 = MilliSecs() - Test1
;test2
Test2 = MilliSecs()
For l = 1 To Number
CHECK = GetChild( CHECKpivot, l )
If EntityDistance( PLAYER, CHECK ) < radius
;do nothing
EndIf
Next
Test2 = MilliSecs() - Test2
;test3
Test3 = MilliSecs()
For l = 1 To Number
CHECK = GetChild( CHECKpivot, l )
Dx# = EntityX( PLAYER ) - EntityX( CHECK )
Dy# = EntityY( PLAYER ) - EntityY( CHECK )
Dz# = EntityZ( PLAYER ) - EntityZ( CHECK )
If ( Dx * Dx + Dy * Dy + Dz * Dz ) < Radius2
;do nothing
EndIf
Next
Test3 = MilliSecs() - Test3
RenderWorld()
Text 0,10,"Test1 : "+Test1
Text 0,20,"Test2 : "+Test2
Text 0,30,"Test3 : "+Test3
Flip
WaitKey()
End