I have implemented what you called Clone2 in place of my original clone and it does make a substantial difference.
The matrices I am working with are very large, on the order of hundreds by hundreds
As for changing algorithms, I wish I could but it is not an option, no other algorithm provides as simple of an implementation nor the ability to modify it as this one does. Just FYI, the algorithm I am working with is the Ullmann algorithm for finding maximum subgraph isomorphism.
Lastly, I should point out that I believe I might have been wrong about the number of times the clone method is being called. According to smallprof the original clone method is called 35Million times but I don't believe this is accurate. After replacing clone with clone 2, which should be called the same number of times smallprof says it is being called 1.06 Million times. I know this is ancillary but curious nonetheless. I don't know if this is an error/limitation with smallprof but its worth pointing out nonetheless.
In reply to Re^2: Performance problem with Clone Method
by Commandosupremo
in thread Performance problem with Clone Method
by Commandosupremo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |