877Re: Save and restore jslint settings
- Sep 2, 2009Fair points. I use bitwise operators in two cases currently:
- For constructing Morton numbers (mapping two dimensions to one). From Wikipedia: "[...] a Morton number is a single integer value constructed by interleaving the bits or digits of one or more source numbers." http://en.wikipedia.org/wiki/Morton_number_(number_theory)
- For addressing Virtual Earth tiles (which uses a quadtree). From MSDN: "To convert tile coordinates into a quadkey, the bits of the Y and X coordinates are interleaved, and the result is interpreted as a base-4 number [...]" http://msdn.microsoft.com/en-us/library/bb259689.aspx
I'm also not sure about whether that indeed optimizes anything. I haven't done profiling comparisons; I'm just reusing well-known algorithms.
--- In firstname.lastname@example.org, "christian.wirkus" <christian.wirkus@...> wrote:
> Off the topic:
- << Previous post in topic Next post in topic >>