…Or must an exception be thrown, to impact performance?
Refer to the accepted answer here. This is something I would like to implement, if creating instances in this way will not slow things down terribly. (I have many thousands of objects to create every second, particle systems and the like. So no, it isn’t premature optimisation, considering the performance impacts that exist when using checked exceptions in Java. Thank you.)
You can create tens of millions of objects per second. For thousands I wouldn’t worry about performance unless you see a problem in the profiler. I would also worry about making the code clear and correct first and consider profiling it later.
Having exceptions in your code has next to no impact (other than making you code slightly larger) Throwing Exceptions is expensive but you could throw thousands of exception per second and still not impact your application performance severely. (buggy code isn’t a good thing all the same)
this test throws over one million
new Exceptions per second