> Now repeated calls to singularity should not affect performance significantly.

My commentary doesn't mean I suggest you to add a caching capability.  You should fix algorithm.  If you can't/won't - let's merge things as is.