зеркало из https://github.com/mono/mail-archives.git
153 строки
4.0 KiB
HTML
153 строки
4.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 621215] New: Generic casts are slow
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20621215%5D%20New%3A%20Generic%20casts%20are%20slow&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="102041.html">
|
|
<LINK REL="Next" HREF="102063.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 621215] New: Generic casts are slow</H1>
|
|
<B>bugzilla_noreply at novell.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20621215%5D%20New%3A%20Generic%20casts%20are%20slow&In-Reply-To="
|
|
TITLE="[Mono-bugs] [Bug 621215] New: Generic casts are slow">bugzilla_noreply at novell.com
|
|
</A><BR>
|
|
<I>Fri Jul 9 10:38:09 EDT 2010</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="102041.html">[Mono-bugs] [Bug 581956] Mono prints "NOT IMPLEMENTED: ResetToDefault()"
|
|
</A></li>
|
|
<LI>Next message: <A HREF="102063.html">[Mono-bugs] [Bug 621215] Generic casts are slow
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#102048">[ date ]</a>
|
|
<a href="thread.html#102048">[ thread ]</a>
|
|
<a href="subject.html#102048">[ subject ]</a>
|
|
<a href="author.html#102048">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE><A HREF="http://bugzilla.novell.com/show_bug.cgi?id=621215">http://bugzilla.novell.com/show_bug.cgi?id=621215</A>
|
|
|
|
<A HREF="http://bugzilla.novell.com/show_bug.cgi?id=621215#c0">http://bugzilla.novell.com/show_bug.cgi?id=621215#c0</A>
|
|
|
|
|
|
Summary: Generic casts are slow
|
|
Classification: Mono
|
|
Product: Mono: Runtime
|
|
Version: SVN
|
|
Platform: Other
|
|
OS/Version: Other
|
|
Status: NEW
|
|
Severity: Normal
|
|
Priority: P5 - None
|
|
Component: JIT
|
|
AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">lupus at novell.com</A>
|
|
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">msafar at novell.com</A>
|
|
QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
|
|
Found By: ---
|
|
Blocker: ---
|
|
|
|
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Collections.Generic;
|
|
|
|
class A
|
|
{
|
|
}
|
|
|
|
class Test : A
|
|
{
|
|
static T TestMethod<T> (A a) where T : A
|
|
{
|
|
T t = null;
|
|
for (int i = 0; i < 10000000; ++i)
|
|
t = (T) a;
|
|
|
|
return t;
|
|
}
|
|
|
|
|
|
public static void Main ()
|
|
{
|
|
A target = new Test ();
|
|
|
|
var sw = new Stopwatch ();
|
|
sw.Start ();
|
|
TestMethod<Test> (target);
|
|
sw.Stop ();
|
|
Console.WriteLine (sw.ElapsedMilliseconds);
|
|
Console.WriteLine (target.ToString ());
|
|
}
|
|
}
|
|
|
|
The result on 32-bits
|
|
|
|
Mono: 480
|
|
NET 4.0: 90
|
|
|
|
That's about 5x slower.
|
|
|
|
--
|
|
Configure bugmail: <A HREF="http://bugzilla.novell.com/userprefs.cgi?tab=email">http://bugzilla.novell.com/userprefs.cgi?tab=email</A>
|
|
------- You are receiving this mail because: -------
|
|
You are the QA contact for the bug.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="102041.html">[Mono-bugs] [Bug 581956] Mono prints "NOT IMPLEMENTED: ResetToDefault()"
|
|
</A></li>
|
|
<LI>Next message: <A HREF="102063.html">[Mono-bugs] [Bug 621215] Generic casts are slow
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#102048">[ date ]</a>
|
|
<a href="thread.html#102048">[ thread ]</a>
|
|
<a href="subject.html#102048">[ subject ]</a>
|
|
<a href="author.html#102048">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|