[Mono-bugs] [Bug 68723][Nor] New - Recursive code runs very slowly
Sun, 24 Oct 2004 01:37:40 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by email@example.com.
--- shadow/68723 2004-10-24 01:37:40.000000000 -0400
+++ shadow/68723.tmp.32705 2004-10-24 01:37:40.000000000 -0400
@@ -0,0 +1,51 @@
+Product: Mono: Runtime
+OS Details: Debian Sarge/Kernel 2.4.26-1-k7
+Summary: Recursive code runs very slowly
+Description of problem:
+The Mono runtime seems to have a lot of overhead in making a function call.
+ I discovered this when implemented a simple 'power' algorithm for a CS
+class -- the O(n) algorithm ran faster than the O(lg n) algorithm in Mono.
+ This is clearly bogus. I later verified that this is NOT the case with
+the Microsoft runtime.
+Steps to reproduce the problem:
+1. Write any sort of recursive algorithm (or anything that makes a lot of
+2. Run it in Mono.
+3. Witness the terrible performance.
+Code runs very slowly.
+Code runs fast.
+How often does this happen?
+All the time.
+The byte code generated isn't the problem -- running the resultant image
+(generated by mcs) works fine with the Microsoft runtime (.NET Platform
+1.1). Also, if you run the binary with mint, not mono (ie, skipping JIT)
+then the O(lg(n)) algorithm runs faster than the O(n) algorithm as
+expected, but if you run it with mono, the O(n) algorithm runs much faster.
+ This leads me to think that it must be something to do with JIT.
+I'll be happy to help fix the bug, I just don't know where to start and no
+one was interested in helping out on #mono. Please contact me for more