Add preCompile function

This change require the user to precompile their defined types.
This will speed up bulk reads and writes significantly

@rprieto - what do you think of this?