Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(data.table)
- library(ggplot2)
- amd_dt = fread("./amd_dt.csv")
- make_time_plot = function(amd_dt, timing_type) {
- amd_real = amd_dt[type == timing_type]
- amd_real[, time := minutes * 60 + seconds]
- ggplot(amd_real, aes(threads, time,
- colour=branch, shape=branch)) +
- geom_point() + geom_line() +
- geom_abline(slope=1, intercept=0, linetype=2) +
- ggtitle(paste0("Warfarin Model Timings:", timing_type), "TBB vs. Old map_rect") +
- ylab("Time") +
- xlab("Threads") +
- scale_x_log10(breaks=c(1, 1:8*4)) +
- theme(legend.position = "bottom") +
- theme_bw()
- }
- make_time_plot(amd_dt, "user")
- amd_dt[, time := minutes * 60 + seconds]
- amd_real_dt = amd_dt[type == "real", .(branch, threads, time)]
- amd_real_sum_dt = amd_dt[, .(time = median(time)), .(branch, threads)]
- amd_real_cast_dt = dcast(amd_real_sum_dt, threads~branch, value.var = "time")
- amd_real_cast_dt[, speedup := 1 - (new/old)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement