64k with mingw
category: general [glöplog]
midiclub: as sagacity said, you are already compressing the executable with an LZ-variant if you use UPX, why not let the packer do all the work? The result tend to be smaller that way.
kusma: it's called "clueless" ;)
it's a bit counterintuitive, but such things CAN (though only in *very* limited cases :) improve compression ratio a bit. the basic point is that you can improve on areas of the file that otherwise seriously pollute your lz dictionary :) - ~150 bytes of basically non-compressible data can perform better overall than ~5k of well-compressible but "dictionary polluting" data in that case.
i'd not recommend writing an own lz packer for it though - doing a decent lz is not as easy as one might think, and it's too much work for too little improvement if you don't happen to have code for it lying around :)
i'd not recommend writing an own lz packer for it though - doing a decent lz is not as easy as one might think, and it's too much work for too little improvement if you don't happen to have code for it lying around :)
ryg: exactly what i meant!
And by LZ-compression i really meant the executable compressor, effect of which is to be considered anyway. If i would (try to) code anything myself, it should be as simple as data reordering. Tokeniser/detokeniser sounds appealing, just because de-tokeniser can be made very tiny and simple.
I was in fact pointing out that executable compressor is almost equivalent to a tokeniser/detokeniser idea! So it is really a small difference to one or the other side.
-eye/midiclub
PS. plek: you are clueless enough to call me clueless? Beware of me on the parties! I'll be right behind you! And my teeth are sharp. I need fresh blood!
And by LZ-compression i really meant the executable compressor, effect of which is to be considered anyway. If i would (try to) code anything myself, it should be as simple as data reordering. Tokeniser/detokeniser sounds appealing, just because de-tokeniser can be made very tiny and simple.
I was in fact pointing out that executable compressor is almost equivalent to a tokeniser/detokeniser idea! So it is really a small difference to one or the other side.
-eye/midiclub
PS. plek: you are clueless enough to call me clueless? Beware of me on the parties! I'll be right behind you! And my teeth are sharp. I need fresh blood!
yeah yeah, hear hear, whatever :)
Better be carefull that he doesn't anallyze you :)
GNU ld _can_ optimize out unneeded object files, but it has much bigger problems optimizing out unneeded functions. Try -ffunction-sections -fdata-sections (putting each function in its own section, more or less) and -Wl,--gc-sections to the linker to garbage collect away unused sections (GNU ld on Linux refuses to to gc-sections on dynamic binaries, but you can override that in the code and clean up the mess afterwards yourself ;-) ). I don't know if gc-sections is supported on Windows (ie. with mingw), though.
Another problem is that for weird technical reasons (virtual inheritance, for instance) every constructor is emitted twice. Don't use big constructors if you're using C++, have an init() method instead. :-)
In general, I'd believe that MSVC++ has the edge for producing small executables and code still, but with some tweaking mingw is probably OK too. Still, if you want to have those extra kilobytes... =)
Another problem is that for weird technical reasons (virtual inheritance, for instance) every constructor is emitted twice. Don't use big constructors if you're using C++, have an init() method instead. :-)
In general, I'd believe that MSVC++ has the edge for producing small executables and code still, but with some tweaking mingw is probably OK too. Still, if you want to have those extra kilobytes... =)
Talking code ? great ..
I'm just starting code, and i use LCC-win32 compiler, because it's free and damn enough for my debut needs ... ( though the IDE sucks big time, and that the compiled exes are slower than any DevC/MsVC exes ).
Do anybody know if it used in demoscene ? or even for 64K intros, as the exes produced are really small in size ? ( i have troubles getting MiniFmod running under LCC, as i doesn't handle ASM code the way MsVC does ... and it's far from my knwoledge, for now :( )
Anyone ?
I'm just starting code, and i use LCC-win32 compiler, because it's free and damn enough for my debut needs ... ( though the IDE sucks big time, and that the compiled exes are slower than any DevC/MsVC exes ).
Do anybody know if it used in demoscene ? or even for 64K intros, as the exes produced are really small in size ? ( i have troubles getting MiniFmod running under LCC, as i doesn't handle ASM code the way MsVC does ... and it's far from my knwoledge, for now :( )
Anyone ?
this might sound stupid but WHY IN THE HELL ARE YOU USING SHITTY FREE COMPILERS IF YOU DON'T HAVE TO - as if they could beat vc6/vc7 at anything at all. and don't give me that "i dont want to use pirated software" shit, because thats probably what you've been doing all your life.
I want to code a compiler. It will be a basic compiler with integrated assembly and special features and ideas that were never introduced before. I will start the project in Quickbasic, just to see that it works and to learn, and perhaps I will convert it later to assembler. The produced code will be assembly of course and not interpreted bytecode. I'll try to optimise at it's best. That's because I found out that modern compilers are not for me. Every coder who respects himself should code his own tool that fits him the best. That's what I am gonna do sooner or later..
Mr PLEK > uh oh ! You just sound like all my friends around ! ^^ "Leave that shitty compiler, get to work with a real tool ! " ...
Well, what can i say: i feel comfortable with it's little straight and minimalistic IDE. As i said, it's really enough for my needs, and i'm getting nice little results using LCC/OpenGL.
And i never said it could beat VC6/7.
No harm ... It's just a matter of taste after all ! :)
Well, what can i say: i feel comfortable with it's little straight and minimalistic IDE. As i said, it's really enough for my needs, and i'm getting nice little results using LCC/OpenGL.
And i never said it could beat VC6/7.
No harm ... It's just a matter of taste after all ! :)
Optimus : have you got any idea how difficult it is to write a compiler ? IN QUICKBASIC ?? ON YOUR OWN ?? impossible. better learn some c, and do it fast..
Every coder who respects himself should code his own tool that fits him the best.
why leave it at that?
every coder who respects himself should invent his own programming language. every graphics artist who respects himself should create a new colour space instead of settling with rgb or cmyk. and every coder should program a tool for the graphics artist, naturally using his newly-invented programming language. and every musician should invent a new scale.
why leave it at that?
every coder who respects himself should invent his own programming language. every graphics artist who respects himself should create a new colour space instead of settling with rgb or cmyk. and every coder should program a tool for the graphics artist, naturally using his newly-invented programming language. and every musician should invent a new scale.
reed: indeed. and possibly the new scale should use a very personal set of frequencies which don't correspond to the common notation scheme... and oh! the coder should also code a proper tracker to allow that, obviously using his brand new language.
Then, the demo will mostly suck arse and will show dutch color scheme fx with psytrance music :D
Then, the demo will mostly suck arse and will show dutch color scheme fx with psytrance music :D
Um, why would one use "suck arse" in the same sentence with "dutch color scheme"?
Oh, wait.
Oh, wait.
let's all just suck ass and use "free" compilers (not as in free money, but as in free bukkake)
I decided it. I will code my ultimate compiler and I will bring world domination by coding a demo in that!
P.S. I am bored to hear people "Do you know how hard this is? You should better not try it..". This is nonsense to me..
P.S. I am bored to hear people "Do you know how hard this is? You should better not try it..". This is nonsense to me..