153 reputation
5
bio website
location
age
visits member for 10 months
seen Aug 9 at 19:39

What say you to three shillings and we forget the about me.


Sep
24
awarded  Autobiographer
Jan
15
asked How do I find which line connected two squares?
Dec
16
awarded  Scholar
Dec
16
accepted Faster reads, on an infinite grid plane, than using a hash table?
Dec
16
comment Faster reads, on an infinite grid plane, than using a hash table?
Good call on the memory locality; instead of for(y)for(x) I switched it to for(x)for(y) (causing y*h+x to be effectively random) and performance went from 1012% to 270%. At that low of difference, it's not worth the effort. You were right all along.
Dec
16
revised Faster reads, on an infinite grid plane, than using a hash table?
deleted 402 characters in body
Dec
15
revised Faster reads, on an infinite grid plane, than using a hash table?
added 38 characters in body
Dec
15
awarded  Supporter
Dec
15
revised Faster reads, on an infinite grid plane, than using a hash table?
added 19 characters in body
Dec
15
revised Faster reads, on an infinite grid plane, than using a hash table?
added 367 characters in body
Dec
14
revised Faster reads, on an infinite grid plane, than using a hash table?
added 44 characters in body
Dec
14
revised Faster reads, on an infinite grid plane, than using a hash table?
added 16 characters in body
Dec
14
comment Faster reads, on an infinite grid plane, than using a hash table?
@svick The size of the bounding rectangle, yes. The bounding rectangle is the smallest rectangle that can be made which still contains all points of data. If the conversion is array_index=y*boundingRectWidth+x then a change to boundingRectWidth invalidates that conversion. Furthermore, an increase to boundingRectHeight means the array is no longer large enough to fit the entire boundary (a decrease is mostly harmless). And so an increase to either means recreating the array.
Dec
14
revised Faster reads, on an infinite grid plane, than using a hash table?
added 42 characters in body
Dec
14
awarded  Student
Dec
14
comment Faster reads, on an infinite grid plane, than using a hash table?
You might be right, but keep in mind O(1) doesn't mean fast. O(n) can be faster than O(1) on many occasions. And an array's O(1) is much faster than a Dictionary's O(1).
Dec
14
comment Faster reads, on an infinite grid plane, than using a hash table?
@Euphoric (x<<16)|y where x and y are both 16 bits and hash codes are 32 bits.
Dec
14
revised Faster reads, on an infinite grid plane, than using a hash table?
edited title
Dec
14
revised Faster reads, on an infinite grid plane, than using a hash table?
edited title
Dec
14
awarded  Editor