Was playing around with MAX7219, noticed column takes longer than row updates

#include "LedControl.h"

byte numberDisplay = 8;     // how many displays to use
LedControl lc = LedControl(2, 3, 4, numberDisplay); // Pins: DIN,CLK,CS, # of Display connected

void setup()
{
  for (byte i = 0; i < numberDisplay; i++) {
    lc.shutdown(i, false);   // Wake up displays
    lc.setIntensity(i, 5);   // Set intensity levels
    lc.clearDisplay(i);      // Clear Displays
  }
}

void loop() {
  for (byte i = 0; i < numberDisplay; i++) {
    for (byte j = 0; j <= 7; j++) {
      lc.setColumn(i, j, 255);
    }
  }
  for (byte j = 0; j <= 7; j++) {
    for (byte i = 0; i < numberDisplay; i++) {
      lc.setRow(i, j, 0);
      delay(5);
    }
  }
  for (byte i = 0; i < numberDisplay; i++) {
    for (byte j = 0; j <= 7; j++) {
      lc.setColumn(7-i, 7-j, 255);
    }
  }
  for (byte j = 0; j <= 7; j++) {
    for (byte i = 0; i < numberDisplay; i++) {
      lc.setRow(7-i, 7-j, 0);
      delay(5);
    }
  }
}

Mostly a simple fill and wipe loop for checking up to 8 LED dot matrix. I noticed that drawing column seems to take a few cycles longer than drawing row, I had to add delay to row writes to make the whole display seems to run at the same speed.

I guess row writing is one data cycle, but column writing is 8 cycles of updating one LED each rows.

Just my observation. Running off UNO, the column writing lag is probably more noticeable if you used AVR chips at lower clock speed, like ATTiny85 at 8MHz

Yes, setting a row on involves sending 2 bytes of data to each chip, so 16 bytes in total. Setting a column requires 16 bytes per chip, 128 bytes in total. Of course, what a "row" is and what a "column" is depends on the wiring between the chips and the led matrix.

But normally this is not a problem and very large matrices can be updated quickly, even using slower Arduino. The reason you may have noticed is because you are using the LedControl library, which is not very efficient, for example having no way to batch-up multiple changes into a single update cycle, and because you are not using the Arduino's SPI hardware, which is many times faster at sending the data to the chips compared to the "bit banging" software technique used by LedControl.

Can you suggest library that is more efficient? I'd like to experiment and see how much difference there are in speed and flash storage space.

The "Parola" library is popular and is developed and maintained by a forum member (Marco).

The Parola library (MD_Parola) uses the MD_MAX72xx library as the basis for the hardware control. This hardware library is the equivalent to the LEDControl library. Parola provides the layer that gives the animated text effects.

Access them through the link in my signature.