Jump to content
You are about to reply to a thread that has been inactive for 1510 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

So i have this function2 that pre-processes a string as part of a much more complex function1. What I have noticed is that calling the function2 is faster than inlining the function2's code in function1.

Is this my imagination, or are there possibly optimizations in the Mono compiler that favor short functions over doing similar in-line in a much larger function? I know that some traditional language compilers will go so far as to assign frequently used variables in a function to processor registers, favoring short functions. Also smaller functions fit in smaller processor caches... but I can't imagine Mono taking advantage of either?

Posted

i think if a function is faster in some cases then it is most likely due to heap memory management / garbage collection within the event

was a big discussion started by animats on here previously about memory management in events which showed that forcing garbage collection within an event helped to improve performance when there is a lot of data to process  

  • Like 1
You are about to reply to a thread that has been inactive for 1510 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...