How to replace DI in Clojure?

I recently did some research about the performance impact of exceptions in Java/Clojure.

It is worth nothing that the biggest performance impact of exceptions is when you create an exception, and that is because of the cost of creating the stack trace.

However, you can create an exception without adding the stack trace, by using a constructor overload for the Throwable class.

See here for a good explanation and benchmarks: https://www.baeldung.com/java-exceptions-performance

I’m not sure if this adds anything to the discussion, but it is something that I found interesting about the cost of exceptions.