[Mono-list] RE: [Ikvm-developers] ikvm under mono && mauve tests

Jeroen Frijters jeroen@sumatra.nl
Sat, 15 Feb 2003 20:05:37 +0100


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2D525.3970C716
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi Paolo,

Attached is a testcase. Runs in 50ms on MS .NET, takes 16534 ms on Mono
0.l7 (sorry, I don't have a more recent version).

Regards,
Jeroen

> =20
> =20
> -----Original Message-----
> From: Paolo Molaro [mailto:lupus@ximian.com]=20
> Sent: Saturday, February 15, 2003 19:37
> To: ikvm-developers@lists.sourceforge.net
>=20
> On 02/15/03 Jeroen Frijters wrote:
> > > - gnu.testlet.java.lang.reflect.Array.newInstance hangs because
> > >   java.lang.reflect.Array.newInstance (String.class, new
> > > int[255]) is very slow (at least under mono).
> >=20
> > Paolo, could you please have a look at this?
>=20
> What is that code supposed to do?
> I wrote a simple program to create a n-dimensional array in C#:
>=20
> using System;
> class T {
> 	static void Main () {
> 		Array a1 =3D Array.CreateInstance (typeof=20
> (string), new int [32]);
> 		Console.WriteLine ("{0}", a1);
> 	}
> }
>=20
> I also used 255 instead of 32 and the code runs fast, with no
> noticeable delay (the MS runtime doesn't allow a dimension > 32).
>=20
> If the code is supposed to create a jagged array with 255 dimensions I
> can see why it would be slow:-) But I doubt it's supposed to do that,
> right? I'm completely clueless about the java API, so if you can
> describe what should happen there, I'll write a test.
>=20
> Thanks.
>=20
> lupus
>=20
> --=20
> -----------------------------------------------------------------
> lupus@debian.org                                     debian/rules
> lupus@ximian.com                             Monkeys do it better
>=20
>=20
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Ikvm-developers mailing list
> Ikvm-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ikvm-developers
>=20

------_=_NextPart_001_01C2D525.3970C716
Content-Type: application/octet-stream;
	name="arraytest.cs"
Content-Transfer-Encoding: base64
Content-Description: arraytest.cs
Content-Disposition: attachment;
	filename="arraytest.cs"

dXNpbmcgU3lzdGVtOw0KDQpjbGFzcyB0ZXN0DQp7DQoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4o
KQ0KCXsNCgkJaW50IHN0YXJ0ID0gRW52aXJvbm1lbnQuVGlja0NvdW50Ow0KCQluZXdJbnN0YW5j
ZSh0eXBlb2Yoc3RyaW5nKSwgbmV3IGludFsyNTVdKTsNCgkJaW50IGVuZCA9IEVudmlyb25tZW50
LlRpY2tDb3VudDsNCgkJQ29uc29sZS5Xcml0ZUxpbmUoZW5kIC0gc3RhcnQpOw0KCX0NCg0KCXB1
YmxpYyBzdGF0aWMgT2JqZWN0IG5ld0luc3RhbmNlKFR5cGUgY29tcG9uZW50VHlwZSwgaW50W10g
ZGltZW5zaW9ucykNCgl7DQoJCWlmIChkaW1lbnNpb25zLkxlbmd0aCA8PSAwKQ0KCQkJdGhyb3cg
bmV3IEV4Y2VwdGlvbiAoIkVtcHR5IGRpbWVuc2lvbnMgYXJyYXkuIik7DQoJCXJldHVybiBjcmVh
dGVNdWx0aUFycmF5KGNvbXBvbmVudFR5cGUsIGRpbWVuc2lvbnMsDQoJCQlkaW1lbnNpb25zLkxl
bmd0aCAtIDEpOw0KCX0NCg0KCXByaXZhdGUgc3RhdGljIE9iamVjdCBjcmVhdGVNdWx0aUFycmF5
KFR5cGUgdHlwZSwgaW50W10gZGltZW5zaW9ucywNCgkJaW50IGluZGV4KQ0KCXsNCgkJaWYgKGlu
ZGV4ID09IDApDQoJCQlyZXR1cm4gQXJyYXkuQ3JlYXRlSW5zdGFuY2UodHlwZSwgZGltZW5zaW9u
c1swXSk7DQoNCgkJT2JqZWN0IHRvQWRkID0gY3JlYXRlTXVsdGlBcnJheSh0eXBlLCBkaW1lbnNp
b25zLCBpbmRleCAtIDEpOw0KCQlUeXBlIHRoaXNUeXBlID0gdG9BZGQuR2V0VHlwZSgpOw0KCQlP
YmplY3RbXSBy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