Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Academy » Planet value calculation made easy!
Re: Planet value calculation made easy! Tue, 02 October 2007 17:36 Go to previous messageGo to previous message
yartrebo is currently offline yartrebo

 
Petty Officer 3rd Class

Messages: 43
Registered: July 2006
Location: North America
Quote:

It's true that bitpacking code increases EXE size. However, compressed strings also decrease the size.

You can reduce both string size and EXE size by using generic compression such as bz2 or zip. Most compression algorithms handle extra 0s very easily and the bitpacking will do little to increase compression.

The compression will slow down the opening of the file a bit, but it will neither bloat the codebase nor impose tight constraints the way bitpacking does.

I am using some bitpacking the stars! clone I'm writing, but it is limited to places where it will not impose restrictions such as storing all LRTs in a 32-bit dword, where performance will be equal to or faster than using separate variables, and where the code bloat will be marginal. For the LRT examples, it's faster than using a bunch of 8-bit bytes since 8-bit operations are very slow, doesn't need as much RAM (speeding up cache performance), and can be tested in two machine operations (and bitfield, mask[IFE]; jnz), which is as fast as if I spent a whole 32-bits for each trait (xor lrt[IFE], 0x0; jnz).


[Updated on: Tue, 02 October 2007 17:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon1.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Research
Next Topic: Ship Teleportation bug
Goto Forum:
  


Current Time: Mon Jun 10 17:13:43 EDT 2024