On Jun 20, 2008, at 09:34, Max Berger wrote:

The JVM converts all shorts to ints before doing any arithmetic, so
shorts are actually a little bit slower than ints.

As for the size: If you have primitive values, an int takes up 4 byte,
whereas a short takes 2 bytes (+java overhead), meaning 100.000 * 3 int
rather than shorts should take up 600kbyte of memory more - hardly
noticeable compared to fops overall memory usage.

Thanks for the info.

FYI: Change has been committed with r670422

Since TextLayoutManager now no longer duplicates the char array, the increase due to switching to ints is even compensated somewhat...



Reply via email to