It seems like your focus may be on premature optimization.
When creating tests, prioritize the best user experience for developers - write tests that are easy to read and provide clear error messages when they fail. Spending time debugging poorly written tests can take much longer than running a "slow but readable" version of the same test.
If your test suite is running too slowly, use the tools provided by your testing framework (such as rspec or minitest) to identify the slowest tests and optimize them. Often, the slowness of these tests is due to factors other than what you may have initially assumed.
UPD:
Check out this website:
This site allows you to compare how many computing hours of AWS EC2 instance time you can purchase with the amount you are being paid per hour by your customer/company.
From their "Why" page:
While microbenchmarks and language debates can be entertaining, does it truly matter if it takes 5 seconds instead of 0.5 seconds to calculate a million things? In most cases, probably not. Consider whether investing time in making your code faster versus easier to maintain and modify later is worth it in the long run. Sometimes, simply increasing processing time can solve the problem more efficiently.
(Note the mention of "across FIVE YEARS" in the image header)