This hits on something that a good CS education should teach - abstraction is often very cool and provides some interesting ways to write code, but it often comes at the cost of performance.
The trade-off between performance and abstraction is something to be aware of when writing programs, and perhaps the most important thing to be aware of is that implementing abstraction takes a lot of programming time for designing and testing. Balancing these two ideas in a way that meets current requirements and anticipates future requirements is part the art of computer programming (with apologies to Don Knuth!). :)