https://bugzilla.novell.com/show_bug.cgi?id=354495
Summary: Optimization - GMCS should use cpobj more
Product: Mono: Compilers
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
GMCS should emit an optimized IL for code like this:
class Test<T> {
public static void NoInline() {}
public void Copy(ref T a, ref T b) {
a = b;
NoInline();
}
}
Right now the copy is implemented like this:
ldarg.1
ldarg.2
ldobj !T
stobj !T
This code is translated by the JIT into a memcpy to the stack and then a memcpy
to the destination address.
The compiler could use instead the following sequence:
ldarg.1
ldarg.2
cpobj !T
The generated code have just one memcpy and run twice as fast.
GMCS should use cpobj every time the source is a managed pointer.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs