×

To be able to write in the forum you need to authenticate. Meanwhile it's read-only.

Change History

New api methods will be announced here. Changes in our data that is relevant to checkers scripts/tags will also be announced here.

Message: Re: Big boring changes incoming (PHP7)

Changed By: magma1447
Change Date: March 09, 2018 05:26PM

Re: Big boring changes incoming (PHP7)
The DEV server now has a more recent version of that library. I ran your test checker to see the results. Still quite slow.
Vincenty: 0.1489622 ms 111420.728 m
Haversine: 0.1146362 ms 111195.08 m
Pythagoras: 0.0019958 ms 111420.69881874 m
os.clock: 0.0015268 ms

I had to enable your script and tag meanwhile,hope I didn't interrupt any editing.


Since that didn't help I was curious if it was the phpgeo library or not. I then made a small PHP script that calculates Haversine 100,000 times in a loop. 12.141s on DEV and 11.315s on Live. I can't say if the small difference is due to hardware or software, but I don't think we care about that small difference. I also only ran it once.

So, it doesn't seem to be the library. I am thinking maybe it's the cost of using the callbacks added to the Sandbox. Do you think you can implement a test that asks for a list of distances? So instead of calling DistanceVincenty() /DistanceHaversine() X times in a loop, we build a list of data and call a test function like DistanceVincentyList()?
/DistanceHaversineList()?
The list should then be something like
{ {lat1 = 10, lon1 = 10, lat2 = 20, lon2 = 20}, {lat1 = 30, lon1 = 30, lat2 = 31, lon2 = 31} ... }

I prefer to not implement that on Live, but at least we can see if it becomes much faster on DEV.

EDIT: Such callback exists now (not tested). It will return the results. As it is now, it just returns an array with the distances in the same order as it got the coordinate pairs. Probably not a useful design, but good enough for testing.
Changed By: magma1447
Change Date: March 09, 2018 05:21PM

Re: Big boring changes incoming (PHP7)
The DEV server now has a more recent version of that library. I ran your test checker to see the results. Still quite slow.
Vincenty: 0.1489622 ms 111420.728 m
Haversine: 0.1146362 ms 111195.08 m
Pythagoras: 0.0019958 ms 111420.69881874 m
os.clock: 0.0015268 ms

I had to enable your script and tag meanwhile,hope I didn't interrupt any editing.


Since that didn't help I was curious if it was the phpgeo library or not. I then made a small PHP script that calculates Haversine 100,000 times in a loop. 12.141s on DEV and 11.315s on Live. I can't say if the small difference is due to hardware or software, but I don't think we care about that small difference. I also only ran it once.

So, it doesn't seem to be the library. I am thinking maybe it's the cost of using the callbacks added to the Sandbox. Do you think you can implement a test that asks for a list of distances? So instead of calling DistanceVincenty() X times in a loop, we build a list of data and call a test function like DistanceVincentyList()?
The list should then be something like
{ {lat1 = 10, lon1 = 10, lat2 = 20, lon2 = 20}, {lat1 = 30, lon1 = 30, lat2 = 31, lon2 = 31} ... }

I prefer to not implement that on Live, but at least we can see if it becomes much faster on DEV.

EDIT: Such callback exists now (not tested). It will return the results. As it is now, it just returns an array with the distances in the same order as it got the coordinate pairs. Probably not a useful design, but good enough for testing.
Changed By: magma1447
Change Date: March 09, 2018 05:20PM

Re: Big boring changes incoming (PHP7)
The DEV server now has a more recent version of that library. I ran your test checker to see the results. Still quite slow.
Vincenty: 0.1489622 ms 111420.728 m
Haversine: 0.1146362 ms 111195.08 m
Pythagoras: 0.0019958 ms 111420.69881874 m
os.clock: 0.0015268 ms

I had to enable your script and tag meanwhile,hope I didn't interrupt any editing.


Since that didn't help I was curious if it was the phpgeo library or not. I then made a small script that calculates Haversine 100,000 times in a loop. 12.141s on DEV and 11.315s on Live. I can't say if the small difference is due to hardware or software, but I don't think we care about that small difference. I also only ran it once.

So, it doesn't seem to be the library. I am thinking maybe it's the cost of using the callbacks added to the Sandbox. Do you think you can implement a test that asks for a list of distances? So instead of calling DistanceVincenty() X times in a loop, we build a list of data and call a test function like DistanceVincentyList()?
The list should then be something like
{ {lat1 = 10, lon1 = 10, lat2 = 20, lon2 = 20}, {lat1 = 30, lon1 = 30, lat2 = 31, lon2 = 31} ... }

I prefer to not implement that on Live, but at least we can see if it becomes much faster on DEV.

EDIT: Such callback exists now (not tested). It will return the results. As it is now, it just returns an array with the distances in the same order as it got the coordinate pairs. Probably not a useful design, but good enough for testing.

Original Message

Author: magma1447
Date: March 09, 2018 05:17PM

Re: Big boring changes incoming (PHP7)
The DEV server now has a more recent version of that library. I ran your test checker to see the results. Still quite slow.
Vincenty: 0.1489622 ms 111420.728 m
Haversine: 0.1146362 ms 111195.08 m
Pythagoras: 0.0019958 ms 111420.69881874 m
os.clock: 0.0015268 ms

I had to enable your script and tag meanwhile,hope I didn't interrupt any editing.


Since that didn't help I was curious if it was the phpgeo library or not. I then made a small script that calculates Haversine 100,000 times in a loop. 12.141s on DEV and 11.315s on Live. I can't say if the small difference is due to hardware or software, but I don't think we care about that small difference. I also only ran it once.

So, it doesn't seem to be the library. I am thinking maybe it's the cost of using the callbacks added to the Sandbox. Do you think you can implement a test that asks for a list of distances? So instead of calling DistanceVincenty() X times in a loop, we build a list of data and call a test function like DistanceVincentyList()?
The list should then be something like
{ {lat1 = 10, lon1 = 10, lat2 = 20, lon2 = 20}, {lat1 = 30, lon1 = 30, lat2 = 31, lon2 = 31} ... }

I prefer to not implement that on Live, but at least we can see if it becomes much faster on DEV.