What are a few time-consuming operations in C? What are a few time-consuming operations in C? c c

What are a few time-consuming operations in C?


The Ackermann function is usually a fun one, but don't give it very large inputs if you want it to finish in your lifetime.


I know you said you wanted to make your own, but perhaps you could draw upon existing benchmarks for inspiration. The Computer language benchmark game has run many programming languages through a a set of benchmarks. Perhaps you can get some ideas looking at their benchmarks.

Some quick ideas of the top of my head:

  • Matrix multiplication: mulitplying 2large matrices is relativelycomputationally intensive, though youwill have to take caching into account

  • Generating prime numbers

  • Integer factorization

  • Numerical methods for solving ODEs -Runge-kutta for example