logo separator

[mkgmap-dev] [PATCH] swap pow for sqrt to save time

From Mark Burton markb at ordern.com on Mon Feb 16 23:15:29 GMT 2009

> I was looking at hprof output for mkgmap after having processed quite a
> large map and about 40% of the time was being spent in Math.pow() - the
> attached patch swaps out the pow(x, 0.5) for sqrt(x) and the run time
> drops from 130 seconds to around 83! Is there any reason not to go for
> the sqrt version? If not, it's well worth making the change.

Did anyone think this was a bad idea? If not, I shall commit that change
in the morning.




More information about the mkgmap-dev mailing list