If you are familiar with Adafruit_ILI9341 library for SPI displays it is only an "ST7796S equivalent". It was very simple to write. It inherits the same Adafruit base classes as all the other Adafruit TFT libraries.
So if Adafruit_ILI9341 program works at a particular speed the ST7796S version should draw the same. e.g. a 240x320 image.
Obviously a bigger screen has more pixels. So a bigger image will take longer.
Your mega328P requires level shifters. SPI is a bit crap on AVRs.
The STM32F411 has better SPI. Can run faster.
What constructor have you used ?
There will be a massive difference between Hardware SPI and bit-banging in software.
Oh, if you want to see impressive ST7796S performance on the F411 try Bodmer's TFT_eSPI library examples.
Go on. There is a standard graphicstest example sketch.
All that you have to do is say whether you have altered it.
If you have, simply copy-paste your altered lines e.g.
// These are 'flexible' lines that can be changed
#define TFT_CS 10
#define TFT_DC 9
#define TFT_RST 8 // RST can be set to -1 if you tie it to Arduino's reset
and which constructor you used
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ST7796S_kbv tft = Adafruit_ST7796S_kbv(TFT_CS, TFT_DC, TFT_RST);
// These are 'flexible' lines that can be changed
//#define TFT_CS 10
//#define TFT_DC 9
//#define TFT_RST 8 // RST can be set to -1 if you tie it to Arduino's reset
#define TFT_CS PB3
#define TFT_DC PB10
#define TFT_RST PB12
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ST7796S_kbv tft = Adafruit_ST7796S_kbv(TFT_CS, TFT_DC, TFT_RST);
Bear in mind that Adafruit does not want to support STM32.
So they cripple the SPI. (except for RogerClark)
But no one in their right mind would run the RogerClark Core.
Adafruit cripple Teensy4.0 and 4.1 too. Look at the SPI_DEFAULT_FREQ conditional defines.
I haven't tried TFT_ESPI yet. We need to figure out how to configure it. I flashed stm32 using GitHub - prenticedavid/Adafruit_ST7796S_kbv: Adafruit-style library for ST7796S SPI displays. 100,000 microseconds to fill text and 700,000 microseconds to wipe the screen. Or if you overwrite the same set of characters, then 100,000 microseconds. That is, it will take 200,000 microseconds to erase and write the text. These blinks are quite noticeable.
I think I found the cause of the problem.
previously i used: tft.fillRect, tft.fillScreen (TFT_BLACK), tft.setTextColor (TFT_WHITE)
But it seems more correct to use tft.setTextColor (TFT_WHITE, TFT_BLACK), that is, not a transparent background and then tft.fillRect, tft.fillScreen (TFT_BLACK) is not needed.