Last active
December 12, 2017 13:16
-
-
Save jonnyrobbie/62512389d3274b1a3be0747b8b3f7a15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env RScript | |
require("readODS") | |
require("reshape2") | |
require("ggplot2") | |
rm(list=ls()) | |
setwd("~/RWD") | |
sheet <- read_ods("gfx_linux_comp.ods", sheet="data", col_names=TRUE) | |
melted <- melt(sheet, id.vars=c("model", "brand", "manufacturer", "price", "price-msrp", "price-low")) | |
lm_model <- lm(log(value)~log(price)+brand, data=melted) | |
fitline <- data.frame(price=log(220:780)) | |
fitline$amd <- lm_model$coefficients["(Intercept)"]+fitline$price*lm_model$coefficients["log(price)"] | |
fitline$nvidia <- lm_model$coefficients["(Intercept)"]+fitline$price*lm_model$coefficients["log(price)"]+lm_model$coefficients["brandnvidia"] | |
fitline <- exp(fitline) | |
summary(lm_model) | |
lm_model.msrp <- lm(log(value)~log(`price-msrp`)+brand, data=melted) | |
fitline.msrp <- data.frame(price=log(229:709)) | |
fitline.msrp$amd <- lm_model.msrp$coefficients["(Intercept)"]+fitline.msrp$price*lm_model.msrp$coefficients["log(`price-msrp`)"] | |
fitline.msrp$nvidia <- lm_model.msrp$coefficients["(Intercept)"]+fitline.msrp$price*lm_model.msrp$coefficients["log(`price-msrp`)"]+lm_model.msrp$coefficients["brandnvidia"] | |
fitline.msrp <- exp(fitline.msrp) | |
summary(lm_model.msrp) | |
lm_model.low <- lm(log(value)~log(`price-low`)+brand, data=melted) | |
fitline.low <- data.frame(price=log(229:709)) | |
fitline.low$amd <- lm_model.low$coefficients["(Intercept)"]+fitline.low$price*lm_model.low$coefficients["log(`price-low`)"] | |
fitline.low$nvidia <- lm_model.low$coefficients["(Intercept)"]+fitline.low$price*lm_model.low$coefficients["log(`price-low`)"]+lm_model.low$coefficients["brandnvidia"] | |
fitline.low <- exp(fitline.low) | |
summary(lm_model.low) | |
plot_data <- ggplot() + | |
geom_point(data=melted, aes(x=price, y=value, color=brand), size=2, alpha=0.5, stroke=0) + | |
scale_colour_manual(values=c("#ed1c24", "#b9e700")) + | |
geom_line(data=fitline, size=1, alpha=0.5, aes(x=price, y=amd), color="#ed1c24") + | |
geom_line(data=fitline, size=1, alpha=0.5, aes(x=price, y=nvidia), color="#b9e700") + | |
labs(x="Price", y="frames per second", title="Frames per second based on the graphic card price", subtitle="Using log-log fit: log(value)~log(price)+brand", caption="Source: https://www.phoronix.com/scan.php?page=article&item=nvidia387-linux415-mesa174 | |
Prices were acquired from newegg.com in 2017-12-09 with care to select the lowest-priced matching card. | |
The coefficients of the fit can be interpreted as for every 1% of increased price, | |
you get 0.5101% of increased performance. And Nvidia cards have 19.68% bigger performance overall. | |
The interaction of ogl and vulcan and different resolutions were not considered in this study.") | |
png("price-fps-liunx.png", width=640, height=640) | |
plot_data | |
dev.off() | |
plot_data_adj <- ggplot() + | |
geom_point(data=melted, aes(x=`price-msrp`, y=value, color=brand), size=2, alpha=0.5, stroke=0, shape=4) + | |
geom_point(data=melted, aes(x=`price-low`, y=value, color=brand), size=2, alpha=0.5, stroke=0, shape=1) + | |
scale_colour_manual(values=c("#ed1c24", "#b9e700")) + | |
geom_line(data=fitline.msrp, size=0.5, alpha=1, aes(x=price, y=amd), color="#ed1c24", linetype="dotted") + | |
geom_line(data=fitline.msrp, size=0.5, alpha=1, aes(x=price, y=nvidia), color="#5C6F06", linetype="dotted") + | |
geom_line(data=fitline.low, size=0.5, alpha=1, aes(x=price, y=amd), color="#ed1c24", linetype="dashed") + | |
geom_line(data=fitline.low, size=0.5, alpha=1, aes(x=price, y=nvidia), color="#b9e700", linetype="dashed") + | |
labs(x="Price", y="frames per second", title="Frames per second based on the graphic card price with data from /u/mad_mesa", subtitle="Using log-log fit: log(value)~log(price)+brand", caption="Source: https://www.phoronix.com/scan.php?page=article&item=nvidia387-linux415-mesa174 | |
Using data from user /u/mad_mesa. Crosses and dotted line corresponds to MSRP price | |
and circles with dashed line corresponds to low price. | |
The coefficients for MSRP were 0.50638% performance increase per 1% of price | |
and nvidia being 14.646% more performant. | |
The coefficients for low price were 0.64273% performance increase per 1% of price | |
and nvidia being 6.318% more performant.") | |
ggsave(plot_data_adj, filename= "price-fps-liunx-adj.png") | |
png("price-fps-liunx-adj.png", width=640, height=640, type="cairo") | |
plot_data_adj | |
dev.off() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model | brand | manufacturer | price | price-msrp | price-low | bioshock | csgo | deus-low | deus-high | deus-ultra | Dota-ogl | Dota-vulkan | Dow-low-ogl | Deo-low-vulkan | Dow-low-ogl-res | Dow-low-vulkan-res | Dow-max-ogl | Dow-max-vulkan | f1-low | f1-ultra | f1-low-res | f1-high | max1-ogl | max2-ogl | max3-ogl | max4-ogl | max1-vulkan | max2-vulkan | max3-vulkan | max4-vulkan | metro | Ss-low | Ss-ultra | talos | unigine | Unigine-res | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GeForce GTX 1060 | nvidia | evga | 225 | 249 | 259 | 93.17 | 134.06 | 23.6 | 32.53 | 35.33 | 70.27 | 73.35 | 64.89 | 68.63 | 32.38 | 34 | 45.62 | 48.28 | 96 | 54 | 58 | 46 | 63.59 | 66.6 | 60.17 | 74.24 | 74.89 | 78.78 | 68.1 | 82.79 | 68.65 | 110.3 | 41.7 | 49.63 | 49.7 | 14.8 | |
GeForce GTX 1070 | nvidia | evga | 468 | 379 | 409 | 116.31 | 185.63 | 32.8 | 44.4 | 48.1 | 93.73 | 96.57 | 85.71 | 86.22 | 45.68 | 43.62 | 62.4 | 61.03 | 130 | 75 | 79 | 63 | 86.17 | 90.11 | 82.47 | 101.02 | 103.96 | 108.04 | 92 | 112.15 | 94.15 | 155.28 | 59.03 | 68.87 | 69.6 | 22.1 | |
GeForce GTX 1070 Ti | nvidia | zotac | 470 | 449 | 449 | 123.93 | 245.76 | 37.97 | 50.27 | 54.6 | 101.23 | 106.53 | 97.17 | 98.69 | 52.21 | 50.08 | 72.31 | 70.95 | 152 | 90 | 96 | 77 | 94.37 | 98.67 | 92.98 | 111.73 | 112.86 | 119.79 | 103.56 | 124.91 | 101.51 | 170.48 | 62.35 | 76.5 | 81 | 25.4 | |
GeForce GTX 1080 | nvidia | evga | 570 | 599 | 509 | 133.77 | 255.57 | 39.97 | 53.8 | 58.63 | 103.17 | 108.62 | 102.87 | 103.03 | 56.13 | 53.21 | 76.58 | 74.61 | 157 | 95 | 100 | 80 | 104.13 | 108.65 | 103.14 | 124.05 | 128.22 | 116.77 | 114.11 | 138.99 | 112.85 | 172.03 | 66.63 | 83.73 | 86.7 | 24.6 | |
GeForce GTX 1080 Ti | nvidia | evga | 780 | 699 | 709 | 156.14 | 279.33 | 53.2 | 68.63 | 72.47 | 106.63 | 110.83 | 113.99 | 111.26 | 71.94 | 70.06 | 94.39 | 94.18 | 161 | 116 | 130 | 105 | 135.02 | 117.5 | 134.46 | 160.95 | 168.42 | 120.88 | 153.29 | 179.8 | 133.85 | 240.23 | 92.17 | 111.13 | 116.7 | 35.7 | |
Radeon RX 580 | amd | msi | 310 | 229 | 269 | 95.64 | 153.23 | 26.87 | 33.9 | 34.33 | 67.9 | 51.37 | 63.95 | 45.66 | 30.09 | 25.49 | 51.19 | 35.3 | 105 | 64 | 65 | 52 | 72.17 | 77.25 | 63.87 | 80.28 | 72.15 | 75.55 | 59.91 | 73.2 | 63.03 | 102.98 | 42.15 | 44.4 | 42.1 | 16.1 | |
Radeon R9 Fury | amd | asus | 595 | 549 | 299 | 129.24 | 174.87 | 32.03 | 39 | 38.07 | 76.57 | 61.37 | 77.95 | 61.19 | 39.07 | 30.86 | 62.29 | 42.05 | 113 | 68 | 73 | 58 | 100.68 | 97.67 | 88.2 | 110.77 | 101.17 | 97.07 | 82.76 | 100.54 | 80.84 | 130.97 | 57.2 | 60.67 | 47 | 17 | |
Radeon RX Vega 56 | amd | amd | 400 | 399 | 399 | 132.9 | 196.48 | 31.3 | 43.57 | 43.57 | 73.37 | 55.03 | 88.11 | 68.7 | 44.11 | 33.47 | 69.21 | 49.76 | 125 | 76 | 79 | 62 | 92.94 | 100.46 | 86.88 | 108.8 | 91.33 | 92.16 | 77.48 | 91.56 | 80.83 | 128.03 | 53.27 | 52.9 | 59.4 | 24 | |
Radeon RX Vega 64 | amd | amd | 600 | 499 | 499 | 146.39 | 216.1 | 34.5 | 47.57 | 48.13 | 80.1 | 59.23 | 101.96 | 79.28 | 51.26 | 36.37 | 81.39 | 58.87 | 136 | 87 | 89 | 71 | 120.91 | 109.05 | 100.25 | 122.11 | 103.78 | 103.38 | 87.51 | 102.54 | 87.12 | 142.97 | 59.95 | 60.13 | 69.1 | 28 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment