Overview
| Artifact ID: | 9f850770980f9d26ad16e745a245c750442f9f78 |
|---|---|
| Ticket: | 3380073fffffffffffffffffffffffffffffffff
declining [expr] performance |
| User & Date: | ferrieux on 2011-07-28 02:22:07 |
Changes
- icomment:
Yet another data point: the overhead of going into and out of the proc seems to play a role: 8.5 flat : 5.24437 microseconds per iteration 8.5 proc: 5.12985 microseconds per iteration 8.6 flat : 6.1804 microseconds per iteration 8.6 proc : 6.81622 microseconds per iteration Done with: proc flatloop { lat1 lon1 lat2 lon2 } { time { set lat1 [expr {$lat1 / $::RADIAN_CONV}] set lat2 [expr {$lat2 / $::RADIAN_CONV}] set dlon [expr {($lon2 - $lon1) / $::RADIAN_CONV}] expr {acos(sin($lat1) * sin($lat2) + \ cos($lat1) * cos($lat2) * cos($dlon)) * \ 6371.0} } 100000 } puts [flatloop 41.0 -81.0 42.0 -82.0] puts [time {distance 41.0 -81.0 42.0 -82.0} 100000] - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"