[Sablevm-bugs] [ sablevm-Bugs-652416 ] Minor optimization for new object alloc.
Brought to you by:
egagnon
From: SourceForge.net <no...@so...> - 2003-03-09 05:07:14
|
Bugs item #652416, was opened at 2002-12-11 20:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=652416&group_id=5523 Category: Execution Problem Group: SableVM Status: Open Resolution: None Priority: 5 Submitted By: Archie Cobbs (archiecobbs) >Assigned to: Etienne M. Gagnon (egagnon) Summary: Minor optimization for new object alloc. Initial Comment: Why not this patch? memset() is often a lot faster than loops, as the compiler may know how to optimize specially for it... if so this patch should speed up every new object allocation. --- src/libsablevm/gc_copying.c.orig Tue Dec 10 11:51:13 2002 +++ src/libsablevm/gc_copying.c Tue Dec 10 11:51:34 2002 @@ -1054,14 +1054,7 @@ return JNI_ERR; } - { - size_t i; - - for (i = 0; i < instance_size; i++) - { - ((char *) result)[i] = 0; - } - } + memset(result, 0, instance_size); *pinstance = result; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=652416&group_id=5523 |