Re: JavaVM compiler for Python?

Dianne Hackborn (hackbod@saurian.CS.ORST.EDU)
18 Apr 1995 14:24:14 GMT

Hark! The herald connolly@www18.cern.ch (Dan Connolly) posts:
| I looked at the source to the runtime, and it does 2 mallocs per
| string object: one for the header, and one for the char array.
| Considering that strings are immutable, there's an obvious optimization
| that's not being exploited (or wasn't in 1.0.3 or 1.1 or so.)

Well, I just looked at the 1.2 string object, and:

op = (stringobject *)
malloc(sizeof(stringobject) + size * sizeof(char));

I could have sworn this was how 1.1 allocated them, too.

----------------------------------------------------------------------------
Dianne Kyra Hackborn "I believe that U.S. schools have a Search and
hackbod@mail.cs.orst.edu Destroy program, aimed at any hint of creative
Oregon State University thinking exhibited by students."
//www.cs.orst.edu/~hackbod/ -- Frank Zappa