Closed Robinlovelace closed 4 years ago
Heads-up guys I got the 10 fold+ speed-up. I think this function is ready to use!
e = dem_lisbon_raster
r = lisbon_road_segments[1:100, ]
res = bench::mark(check = FALSE,
raster_bilinear = {slope_raster(r, e)},
raster_simple = {slope_raster(r, e, method = "simple")}
)
# ?bench::mark
res
#> # A tibble: 2 x 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 raster_bilinear 12.12ms 12.93ms 77.8 7.73MB 21.5
#> 2 raster_simple 6.49ms 6.78ms 146. 5.68MB 25.6
One question for @temospena, can you try to find out how many routes per second ArcMap calculates? Will be interesting comparison and we could update this section with the result: https://github.com/ITSLeeds/slopes/blob/master/README.Rmd#L94
As discussed with @joeytalbot and @temospena we need to speed this up. 100 routes per second is sloooow, on current benchmark: