accumulating data and dumping

Hi everyone
I have a project i'm working on which requires really high data rates that i can't really seem to get with arduino, so i wonder if there's a way to accumulate the data and then dump it to a pc.
Here is my code:

//Quadrature new code
#include "Arduino.h"
volatile long pulses = 0;


volatile byte pulsesChanged = 0;
volatile long  pulsecount = 0;
int rps= 0; 
unsigned long tim=0;

void setup(){
  Serial.begin(1000000);
  
  attachInterrupt(1, B_CHANGE, CHANGE);
}//setup

void loop(){
  
  if (pulsesChanged != 0) {
    pulsesChanged = 0;
    tim= micros();
    Serial.println(pulses);
    Serial.println(tim)
 
  }
}




void B_CHANGE(){
  if ( PIND&(0x04) == 0 ) {
    if ( PIND&(0x08) == 0 ) {
      // B fell, A is low
      pulses++; // moving forward
    } else {
      // B rose, A is low
      pulses--; // moving reverse
    }
 } else {
    if ( PIND&(0x08) == 0 ) {
      // B fell, A is high
      pulses--; // moving reverse
    } else {
      // B rose, A is high
      pulses++; // moving forward
    }
  }
 

  // tell the loop that the pulses have changed
  pulsesChanged = 1;
}

It prints the time and number of pulses to the serial monitor every time there's a pulse.
What i wonder is if there is a way to save, let's say, 3-5 seconds of said data upon a certain command.
I'd usually just use an array, but the data rate is more than 60,000 readings per second, i don't think there's enough memory on the board for it.

If anyone has an idea how to accomplish this i would be glad to know, or if someone has a different thought about just using an array (or 2 vectors)

Any reply is much appreciated
Thanks

At a serial Baud rate of 1M, you can't print more than 100,000 characters per second, which makes it utterly impossible to print both pulse count and time in microseconds at 60,000 readings per second.

If you need both time and count data on the PC at 60K samples/sec, forget the Arduino and buy a fast digital sampling interface.

Or, use the Arduino to process the data and send a summary to the PC every once in a while.

You might get some help with the latter if you explained the purpose of the encoder.

That's exactly what i'm trying to do- save a sampling interval to the arduino itself triggered by a command, and then dumping all of it to the PC for processing.
Let's say, create an array of 100,000X2, let it fill up on the arduino itself, and after it does- to send all the data to a PC.

Let's say, create an array of 100,000X2

On a PC, but not an Arduino.