The problem with all the pipelines is that you are essentially doubling the work. No matter how fast the decompression is, the data still need to be shuttled to another process.
Perl has PerlIO::gzip which allows you to read gzipped streams directly. Therefore, it might offer an advantage even if its decompression speed may not match that of
use autouse Carp => 'croak';
@ARGV or croak "Need filename\n";
open my $in, '<:gzip', $ARGV
or croak "Failed to open '$ARGV': $!";
1 while <$in>;
close $in or croak "Failed to close '$ARGV': $!";
I tried it with a 13 MB gzip compressed file (decompresses to 1.4 GB) on an old 2010 MacBook Pro with 16 GB RAM and an old ThinkPad T400 with 8 GB RAM with the file already in the cache. On the Mac, the Perl script was significantly faster than using pipelines (5 seconds vs 22 seconds), but on ArchLinux, it lost to unpigz:
$ time -p ./gzlc.pl spy.gz
$ time -p unpigz -c spy.gz | wc -l
$ time -p zcat spy.gz | wc -l
unpigz -c file.gz | wc -l is the winner here both in terms of speed. And, that simple command line surely beats writing a program, however short.