I don't think it would be very simple to replace the 3.9 picture.datatype with the 3.1 one, too many other components depend on it. I guess what we really need is a brand new, super fast picture.datatype written in Assembly that does everything the 3.9 one does, but maybe optimised for palette-mapped screens. That's the only thing I can think of that could help speed up 3.9, and I don't see it happening any time soon.
I think the 3.1 picture.datatype was written in ASM. I think the 3.5/3.9 ones were written in C, like many other components of the OS that were replaced.