Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

FreeBasic and FreePascal (Developers)

posted by Rugxulo(R) Homepage, Usono, 15.07.2014, 18:43

> -O3 won't do much on a program that only contains one statement
> (writeln('hello world');)
>
> This is very true. This is why I changed the target to a GREP utility.
> These programs have a definite use.

DJGPP GNU Grep 2.11 (2.03p2, aka /current/, its latest / last available version):

fgrep.exe 173568
egrep.exe 245248
grep.exe 246784
greppcre.exe 332800

DJGPP GNU Grep 2.11 (2.04, aka /beta/):

fgrep.exe 243712
egrep.exe 315904
grep.exe 316928
greppcre.exe 403456

DJGPP GNU Grep 2.20 (2.04, aka /beta/):

egrep.exe and fgrep.exe are (binary, 2048 bytes) symlinks to the main grep.exe, which is 1,383,936 bytes.

And old XGREP.COM (written in 8086 assembly) is 3380 bytes.

As you probably know, DOS "find" is more or less a simple grep clone without the regexp (but see modern Windows' FINDSTR). Latest FreeDOS FIND 3.0a with LFN support is (unpacked from UPX) only 13528 bytes (but 16-bit code is often smaller, max instruction size for 8086 and 286 is 6 and 10 bytes, respectively).

Obviously XGREP doesn't support filename globbing nor LFNs nor PCRE. And DJGPP 2.04 supports "full" symlinks (thus not only for .EXEs), which bloats up the binaries more than normal, even for same version. And note that these DJGPP binaries were probably compiled for speed (-O2) not size (-Os).

 

Complete thread:

Back to the forum
Board view  Mix view
15188 Postings in 1365 Threads, 250 registered users, 12 users online (0 registered, 12 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum