logo separator

[mkgmap-dev] [PATCH V3]mkgmap performance

From GerdP gpetermann_muenchen at hotmail.com on Mon Jan 2 12:16:05 GMT 2012

Hello Steve,

Steve Ratcliffe wrote
>> reg. "local information": I totally agree, but I found no better way,
>> and it saved a lot of time on my system.
> Personally I think that the way you have done it in the patch is much
> more natural than the existing way!
Ok, so than the patch is fine for me as well.

> It is also possible to make the Coord structure smaller, since only 24
> bits of the latitude and longitude fields are used, so both of the
> byte values could be located in the un-used 16 bits. Also there are
> only three values of highwayCount that matter: 0, 1, and
> more-than-one, so only two bits are required for that. I originally
> did it that way, but because of a mistake I gave up and went back to a
> separate field.  This would save a bit of memory, but it is only worth
> doing if it results in a significant improvement in performance.
I also thought about this, but I wasn't sure how many bits are really used,
and I got the feeling that such bitmask tricks are somehow outaged. I think
I'll give it a try. 
I see two ways:
1) Keep the Coord class, but place these bits somewhere in the two interger
2) Use a long and map all fields in some mapping routines. This will be more
complex, but could allow to use arrays (long[]) to store coords, and I guess
this would mean > 50% memory saving for Coords.


View this message in context: http://gis.638310.n2.nabble.com/PATCH-mkgmap-performance-part-2-tp7123938p7143656.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.

More information about the mkgmap-dev mailing list