Java - Almacenar y cargar arrays a / desde la memoria al disco

Tengo una serie de longitud fija y flotante de 220 millones (fija). Ahora, quiero almacenar / cargar esos arreglos en / desde la memoria y el disco. Actualmente, estoy usando FileChannel y MappedByteBuffer de Java NIO para resolver esto. Funciona bien, pero tarda aproximadamente unos 5 segundos (Tiempo de reloj de pared) para almacenar / cargar la matriz en / desde la memoria al disco. En realidad, quiero uno más rápido. ¿Alguien me puede ayudar? ¿Hay alguna biblioteca / base de datos java / algún otro enfoque incorporado para que la carga / almacenamiento de arreglos sea mucho más rápido? Especialmente me importa cargar en la memoria desde el disco. Quiero hacerlo más rápido. Por lo tanto, si el tiempo de almacenamiento aumentará para hacer eso no tengo ningún problema. Gracias por adelantado.

El código que estoy utilizando se proporciona a continuación (si es necesario):

int savenum = 220000000 ;

public void save() {
 try {
    long l = 0 ;
FileChannel channel = new RandomAccessFile(str1, "rw").getChannel();
MappedByteBuffer mbb = channel.map(FileChannel.MapMode.READ_WRITE, 0, savenum * 8);
mbb.order(ByteOrder.nativeOrder());

for(int i = 0 ; i < savenum ; i++){
l = a[i] ;
 mbb.putLong(l);
}
channel.close();

FileChannel channel1 = new RandomAccessFile(str2, "rw").getChannel();
MappedByteBuffer mbb1 = channel1.map(FileChannel.MapMode.READ_WRITE, 0, savenum * 4);
mbb1.order(ByteOrder.nativeOrder());

for(int i = 0 ; i < savenum ; i++){
 int ll = b[i] ;
 mbb1.putInt(ll);
 }
 channel1.close();
 }
  catch (Exception e){
    System.out.println("IOException : " + e);
  }
 }

 public void load(){
 try{
 FileChannel channel2 = new RandomAccessFile(str1, "r").getChannel();
  MappedByteBuffer mbb2 = channel2.map(FileChannel.MapMode.READ_ONLY, 0, channel2.size());
 mbb2.order(ByteOrder.nativeOrder());
  assert mbb2.remaining() == savenum * 8;
 for (int i = 0; i < savenum; i++) {
 long l = mbb2.getLong();
 a[i] = l ;
 }
 channel2.close();

  FileChannel channel3 = new RandomAccessFile(str2, "r").getChannel();
   MappedByteBuffer mbb3 = channel3.map(FileChannel.MapMode.READ_ONLY, 0, channel3.size());
   mbb3.order(ByteOrder.nativeOrder());
   assert mbb3.remaining() == savenum * 4;
    for (int i = 0; i < savenum; i++) {
    int l1 = mbb3.getInt();
    b[i] = l1 ;
    }
    channel3.close();
    }

    catch(Exception e){
    System.out.println(e) ;
      }
    }

Respuestas a la pregunta(1)

Su respuesta a la pregunta