g10/plaintext.c:do_hash() and g10/sign.c:sign_file() use iobuf_get for process data byte-by-byte. This causes significant processing overhead.
Use of iobuf_read here increases signing speed by 2.0x and verify speed by 4.9x (Ryzen 5800X, SHA256, 4.3GiB file).
Patches used for testing: