摘要 |
In one embodiment the present invention includes a virtual machine environment that performs string operations using borrowed character arrays. A method includes creating a character array area that is related to a thread. The method further includes detecting a string operation which qualifies for using a character array from the thread's character array area. The method further includes borrowing a character array of a character array slot of the character array area. The method further includes performing the string operation using the character array having been borrowed. The method further includes returning the character array to the character array slot when the string operation has been performed. In this manner, the time and memory consumed by string operations may be reduced.
|