Let's see if we can treat number of cylinders as a categorical variable.
fit1 <- lm(qsec ~ as.factor(cyl) + hp - 1, mtcars)
print(summary(fit1), concise = TRUE)
Call: lm(formula = qsec ~ as.factor(cyl) + hp - 1, data = mtcars)
Estimate Std. Error t value Pr(>|t|)
as.factor(cyl)4 20.757765 0.663148 31.302 <1e-04 ***
as.factor(cyl)6 20.375156 0.930557 21.896 <1e-04 ***
as.factor(cyl)8 20.874818 1.391386 15.003 <1e-04 ***
hp -0.019610 0.006435 -3.047 0.005 **
Residual standard error: 1.314 on 28 degrees of freedom
Multiple R-squared: 0.9953, Adjusted R-squared: 0.9946
F-statistic: 1483 on 4 and 28 DF, p-value: < 1e-04
Holding constant hp
it looks like 6 cylinder cars are fastest.