Arduino & HD44780 timings

In some cases the slow down of using Arduino libraries vs talking directly to the raw AVR h/w isn't that high level wrappers that make things simpler/easy to use can't be fast, it is that the Arduino.cc developers made some unfortunate choices and in some cases have decided not to use better & faster code written by others.
i.e. in some cases there is a bit of NIH (not invented here) syndrome.

--- bill

different libraries use different strategies to drive the LCD. So it is no wonder that the times can differ from library to library.
Show your test sketch and your results and we might be able to find a faster library.

#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal.h>          
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

unsigned long TimeFromStart = 0;

unsigned long TimeSaved = 0;

unsigned long TimeDiffrence = 0;

void setup()

{

  lcd.begin(16, 2);  

  Serial.begin(9600);
}

void loop()

{

  TimeFromStart = micros();

  lcd.setCursor(0, 0);   

  lcd.print("0"); 

  TimeSaved = micros();

  TimeDiffrence = TimeSaved - TimeFromStart;

  Serial.println(TimeDiffrence);

  delay(2000);

}

I'm programming in visual studio code and platformio. Librarry by bperrybap also was run in this enviroment. The LiquidCrystal library is from Arduino version 1.0.7.

Result is about 588, then i divide it by 2 and get 294us.

Furthermore I don't need faster library, I just need to do some test for study.

What you are doing looks ok. but IDE version 1.0.7 ? Really?
That is Really REALLY old.
I have every IDE released since 2009 but I don't have that one.
I see 1.0.7 mentioned in the release notes but it has no date and there is no tag for it in the arduino github repository. I don't think 1.0.7 was officially released or was released improperly, or perhaps it was removed.
But it likely came out sometime back in 2014.

MANY changes have been made since then.
Lots of upgrades to newer gcc tools other tools like avrdude.

I would recommend using a much newer version of the IDE like at least 1.6.2 or newer and preferably something very recent like the latest or 1.8.5 or newer.
Many of those older IDEs had ridiculous and necessary file restrictions on file names which can break many library examples.

You timings are fairly close to the numbers provided by LCDiSpeed using the latest IDE.

With the 1.8.16 IDE
LCDiSpeed measures:
284us for LiquidCrystal
91us for hd44780_pinIO

Like I said different libraries do things differently so i/o transfer times can vary and can vary quite a bit.

But based on the numbers you are getting around 300us, I don't think you are really running the LiquidCrystal library from IDE version 1.0.7 since older versions of the LiquidCrystal library were actually much slower than the numbers you measured and the LiquidCrystal code wasn't updated to remove some unnecessary things (which sped it up) until IDE version 1.6.6

--- bill

Little misunderstanding :sweat_smile:

1.0.7 is version of library liquid Crystal

IDE is platformio with visual studio code, I will check version when I back to home.

Thank you for check timings on other library, I see your's is faster maybe I will compare it in my work.

PlatformIO version: Core 5.2.2 Home 3.3.4`