LZMA SDK 4.42 for FPC (Announce)
> EDIT: Compiles w/ 2.4.2 (DOS) in 9.5 secs, compression takes 3 min. 17
> secs., comparison after unpacking still matches. (Note that this particular
> PC is very low on RAM, but that shouldn't? matter if default is 8 MB
> dictionary, right???) Oh, I used -XXs -CX -O3 -Oppentium4 (not that it
> helped, heh).
No, something is definitely wrong with FPC for DOS. There is a serious regression somewhere (although it's in both 2.4.0 and 2.4.2rc1). It shouldn't be this much slower. The Win32 compiler can build and run lzmaalone.exe in less time than the DOS compiler can just (only) compile! My blind guess is that the RTL wasn't compiled with optimizations, but who knows. It's the same freakin' compiler version, it shouldn't behave this differently. (And yes, I compiled the exact same, slightly hacked, source code for each. And I tested on the same computer.) Heck, I even fiddled with the optimization options just in case that was affecting it, but no. Anyways, just FYI, this is not normal for a DOS compiler to be this much slower (if at all) than a Win32 one. Something has gone afoul. (BTW, I don't have older versions to test against. Ask Laaca, heh. Or maybe I'll grab 2.2.4 later, but somehow I doubt it would help. Oh well, just FYI, serious performance issue.)
And just for clarity, here's the (dumb) DOS-friendly patch:
diff -waur lzma442b.old/LZMAAlone.dpr LZMA.442b/LZMAAlone.dpr
--- lzma442b.old/LZMAAlone.dpr 2006-06-13 06:02:00 +0000
+++ LZMA.442b/LZMAAlone.dpr 2010-10-21 08:48:34 +0000
@@ -17,7 +17,7 @@
URangeEncoder in 'compression\RangeCoder\URangeEncoder.pas',
UBufferedFS in 'UBufferedFS.pas',
ULZMAAlone in 'ULZMAAlone.pas',
- ULZMABench in 'ULZMABench.pas',SysUtils;
+ {ULZMABench in 'ULZMABench.pas',}SysUtils;
var lz:TLZMAAlone;
diff -waur lzma442b.old/ULZMAAlone.pas LZMA.442b/ULZMAAlone.pas
--- lzma442b.old/ULZMAAlone.pas 2006-06-13 06:04:58 +0000
+++ LZMA.442b/ULZMAAlone.pas 2010-10-21 08:49:16 +0000
@@ -6,7 +6,7 @@
interface
-uses ULZMABench,ULZMAEncoder,ULZMADecoder,UBufferedFS,ULZMACommon,Classes;
+uses {ULZMABench,}ULZMAEncoder,ULZMADecoder,UBufferedFS,ULZMACommon,Classes;
const kEncode=0;
kDecode=1;
@@ -233,26 +233,26 @@
procedure TLZMAAlone.PrintHelp;
begin
writeln(
- #10'Usage: LZMA <e|d> [<switches>...] inputFile outputFile'#10 +
- ' e: encode file'#10 +
- ' d: decode file'#10 +
- ' b: Benchmark'#10 +
- '<Switches>'#10 +
+ #13#10'Usage: LZMA <e|d> [<switches>...] inputFile outputFile'#13#10 +
+ ' e: encode file'#13#10 +
+ ' d: decode file'#13#10 +
+ ' b: Benchmark'#13#10 +
+ '<Switches>'#13#10 +
// ' -a{N}: set compression mode - [0, 1], default: 1 (max)\n' +
- ' -d{N}: set dictionary - [0,28], default: 23 (8MB)'#10 +
- ' -fb{N}: set number of fast bytes - [5, 273], default: 128'#10 +
- ' -lc{N}: set number of literal context bits - [0, 8], default: 3'#10 +
- ' -lp{N}: set number of literal pos bits - [0, 4], default: 0'#10 +
- ' -pb{N}: set number of pos bits - [0, 4], default: 2'#10 +
- ' -mf{MF_ID}: set Match Finder: [bt2, bt4], default: bt4'#10 +
- ' -eos: write End Of Stream marker'#10
+ ' -d{N}: set dictionary - [0,28], default: 23 (8MB)'#13#10 +
+ ' -fb{N}: set number of fast bytes - [5, 273], default: 128'#13#10 +
+ ' -lc{N}: set number of literal context bits - [0, 8], default: 3'#13#10 +
+ ' -lp{N}: set number of literal pos bits - [0, 4], default: 0'#13#10 +
+ ' -pb{N}: set number of pos bits - [0, 4], default: 2'#13#10 +
+ ' -mf{MF_ID}: set Match Finder: [bt2, bt4], default: bt4'#13#10 +
+ ' -eos: write End Of Stream marker'#13#10
);
end;
procedure TLZMAAlone.Main;
var params:TCommandLine;
dictionary:integer;
- lzmaBench:tlzmabench;
+// lzmaBench:tlzmabench;
inStream:TBufferedFS;
outStream:TBufferedFS;
eos:boolean;
@@ -265,14 +265,14 @@
v:byte;
const propertiessize=5;
begin
-writeln(#10'LZMA (Pascal) 4.42 Copyright (c) 1999-2006 Igor Pavlov 2006-05-15'#10);
+writeln(#13#10'LZMA (Pascal) 4.42 Copyright (c) 1999-2006 Igor Pavlov 2006-05-15'#13#10);
if paramcount<1 then begin
PrintHelp;
exit;
end;
params:=TCommandLine.Create;
if not params.Parse then begin
- writeln(#10'Incorrect command');
+ writeln(#13#10'Incorrect command');
exit;
end;
if params.command=kBenchmark then begin
@@ -281,9 +281,9 @@
dictionary:=params.DictionarySize;
if params.MatchFinder>1 then
raise Exception.Create('Unsupported match finder');
- lzmaBench:=TLZMABench.Create;
- lzmaBench.LzmaBenchmark(params.NumBenchMarkPasses,dictionary);
- lzmaBench.Free;
+// lzmaBench:=TLZMABench.Create;
+// lzmaBench.LzmaBenchmark(params.NumBenchMarkPasses,dictionary);
+// lzmaBench.Free;
end
else if (params.command=kEncode)or(params.command=kDecode) then begin
inStream:=TBufferedFS.Create(params.InFile,fmOpenRead or fmsharedenynone);
Complete thread:
- FPC 2.4.2RC1 - marcov, 15.10.2010, 23:25 (Announce)
- FPC 2.4.2RC1 - Rugxulo, 16.10.2010, 04:28
- FPC 2.4.2RC1 - marcov, 18.10.2010, 20:32
- FPC 2.4.2RC1 - Rugxulo, 18.10.2010, 23:36
- FPC 2.4.2RC1 -- DJGPP Binutils - Rugxulo, 19.10.2010, 09:46
- GPL source hosting requirement - ecm, 19.10.2010, 14:27
- GPL source hosting requirement - Rugxulo, 19.10.2010, 22:33
- GPL source hosting requirement - ecm, 19.10.2010, 22:57
- GPL source hosting requirement - Rugxulo, 20.10.2010, 00:35
- GPL source hosting requirement - ecm, 20.10.2010, 00:40
- GPL source hosting requirement - Rugxulo, 20.10.2010, 00:35
- GPL source hosting requirement - ecm, 19.10.2010, 22:57
- GPL source hosting requirement - marcov, 20.10.2010, 09:47
- LZMA SDK 4.42 for FPC - Rugxulo, 21.10.2010, 15:47
- LZMA SDK 4.42 for FPC - Rugxulo, 21.10.2010, 16:36
- LZMA SDK 4.42 for FPC - Rugxulo, 22.10.2010, 05:14
- LZMA SDK 4.42 for FPC - DOS386, 23.10.2010, 09:21
- LZMA SDK 4.42 for FPC - Rugxulo, 23.10.2010, 10:16
- LZMA SDK 4.42 for FPC - DOS386, 23.10.2010, 09:21
- LZMA SDK 4.42 for FPC - Rugxulo, 22.10.2010, 05:14
- LZMA SDK 4.42 for FPC - marcov, 18.11.2010, 21:15
- LZMA SDK 4.42 for FPC - Rugxulo, 19.11.2010, 15:05
- LZMA SDK 4.42 for FPC - marcov, 22.11.2010, 15:23
- LZMA SDK 4.42 for FPC - Rugxulo, 23.11.2010, 00:29
- LZMA SDK 4.42 for FPC - marcov, 25.11.2010, 11:55
- AdvanceZip / FBC BinUtils / CMT Solitaire - Rugxulo, 25.12.2010, 12:39
- AdvanceZip / BinUtils / CMT Solitaire / DOS DEATH / LZMA - DOS386, 26.12.2010, 08:04
- AdvanceZip / FBC BinUtils / CMT Solitaire - marcov, 01.01.2011, 00:40
- AdvanceZip / FBC BinUtils / CMT Solitaire - Rugxulo, 01.01.2011, 05:47
- AdvanceZip / FBC BinUtils / CMT Solitaire - marcov, 01.01.2011, 13:02
- no FPC Go32v2 maintainer(s) / Unicode kills us all - Rugxulo, 01.01.2011, 14:03
- no FPC Go32v2 maintainer(s) / Unicode kills us all - Laaca, 01.01.2011, 15:12
- no FPC Go32v2 maintainer(s) / Unicode kills us all - marcov, 01.01.2011, 16:56
- no FPC Go32v2 maintainer(s) / Unicode kills us all - marcov, 01.01.2011, 17:46
- no FPC Go32v2 maintainer(s) / Unicode kills us all - Rugxulo, 03.01.2011, 09:44
- BUG - DOS386, 08.03.2011, 14:37
- BUG - FPC 2.5.1 snapshot - Rugxulo, 08.03.2011, 22:40
- BUG - Japheth, 10.03.2011, 12:17
- BUG - Laaca, 10.03.2011, 12:31
- BUG - DOS386, 03.05.2011, 09:48
- BUG - DOS386, 08.03.2011, 14:37
- no FPC Go32v2 maintainer(s) / Unicode kills us all - Rugxulo, 03.01.2011, 09:44
- no FPC Go32v2 maintainer(s) / Unicode kills us all - Laaca, 01.01.2011, 15:12
- no FPC Go32v2 maintainer(s) / Unicode kills us all - Rugxulo, 01.01.2011, 14:03
- AdvanceZip / FBC BinUtils / CMT Solitaire - marcov, 01.01.2011, 13:02
- AdvanceZip / FBC BinUtils / CMT Solitaire - Rugxulo, 01.01.2011, 05:47
- AdvanceZip / FBC BinUtils / CMT Solitaire - Rugxulo, 25.12.2010, 12:39
- LZMA SDK 4.42 for FPC - marcov, 25.11.2010, 11:55
- LZMA SDK 4.42 for FPC - Rugxulo, 23.11.2010, 00:29
- LZMA SDK 4.42 for FPC - marcov, 22.11.2010, 15:23
- LZMA SDK 4.42 for FPC - Rugxulo, 19.11.2010, 15:05
- LZMA SDK 4.42 for FPC - Rugxulo, 21.10.2010, 16:36
- LZMA SDK 4.42 for FPC - Rugxulo, 21.10.2010, 15:47
- GPL source hosting requirement - Rugxulo, 19.10.2010, 22:33
- GPL source hosting requirement - ecm, 19.10.2010, 14:27
- UPX-UCL 3.07 - Rugxulo, 20.10.2010, 03:44
- FPC 2.4.2RC1 - marcov, 04.11.2010, 09:49
- FPC 2.4.2RC1 - Rugxulo, 08.11.2010, 22:27
- FPC 2.4.2RC1 - marcov, 10.11.2010, 20:38
- FPC 2.4.2RC1 - Laaca, 11.11.2010, 00:06
- FPC 2.4.2RC1 - Rugxulo, 11.11.2010, 04:03
- FPC 2.4.2 (final) released - Rugxulo, 14.11.2010, 20:11
- "for .. in" - Rugxulo, 24.11.2010, 01:08
- FPC 2.4.2RC1 - marcov, 10.11.2010, 20:38
- CWSDPMI r5 vs. r7 (paq8o8z) - Rugxulo, 15.11.2010, 22:36
- CWSDPMI r5 vs. r7 (paq8o8z) - marcov, 18.11.2010, 21:13
- CWSDPMI r5 vs. r7 (paq8o8z) - Laaca, 19.11.2010, 11:10
- CWSDPMI r5 vs. r7 (paq8o8z) - Rugxulo, 19.11.2010, 14:52
- CWSDPMI r5 vs. r7 (paq8o8z) - marcov, 22.11.2010, 13:00
- CWSDPMI r5 vs. r7 (paq8o8z) - ecm, 22.11.2010, 14:43
- CWSDPMI r5 vs. r7 (paq8o8z) - marcov, 22.11.2010, 15:21
- CWSDPMI r5 vs. r7 (paq8o8z) - ecm, 22.11.2010, 16:08
- CWSDPMI r7 for FPC - Rugxulo, 23.11.2010, 00:03
- CWSDPMI r5 vs. r7 (paq8o8z) - ecm, 22.11.2010, 16:08
- CWSDPMI r5 vs. r7 (paq8o8z) - marcov, 22.11.2010, 15:21
- CWSDPMI r5 vs. r7 (paq8o8z) - ecm, 22.11.2010, 14:43
- CWSDPMI r5 vs. r7 (paq8o8z) - marcov, 22.11.2010, 13:00
- CWSDPMI r5 vs. r7 (paq8o8z) - Rugxulo, 19.11.2010, 14:52
- CWSDPMI r5 vs. r7 (paq8o8z) - Laaca, 19.11.2010, 11:10
- CWSDPMI r5 vs. r7 (paq8o8z) - marcov, 18.11.2010, 21:13
- FPC 2.4.2RC1 - Rugxulo, 08.11.2010, 22:27
- FPC 2.4.2RC1 -- DJGPP Binutils - Rugxulo, 19.10.2010, 09:46
- FPC 2.4.2RC1 - Rugxulo, 18.10.2010, 23:36
- FPC 2.4.2RC1 - marcov, 18.10.2010, 20:32
- FPC 2.4.2RC1 - Rugxulo, 16.10.2010, 04:28