Proposal for new structure definition for compression algorithm

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Fri Mar 18 10:28:38 UTC 2016


On Thu, Mar 17, 2016 at 03:43:36PM +0000, Sangamesh Sajjan wrote:
> We are proposing following modification for above,
> 
> *         Array of strings shall be used for  1's run length code word
> 
> *         Array of strings shall be used for 0's run length code word
> 
> These two arrays will have code words of both terminating codes and make up codes together.
> 
> In this approach two trees (i.e ones list and zero list) shall be introduced and entire code word traversing shall be done in respective tree in single traversal.
> With this approach we can avoid multiple array usage.

Hi Sangamesh,

though I'm not entirely familiar with the compression algorithm, I'm
pretty sure that using an array of strings to store bits will make the
code less efficient by magnitudes.

If I have bits in a primitive like an int, I can compare them to other
bits with a single CPU clock cycle. Even if they are shifted/fragmented to
a different bit position, using shl or shr (<< or >>) and comparing
int-wise will be extremely faster than iterating an array of chars of '1'
and '0' and interpreting those as 1 and 0.

I do see that it might make the code arrays easier to read and understand
for humans, but that wouldn't make up for the humungous performance loss
you're inflicting at the same time.

Please correct me if I'm missing something, but my guess is that you're on
the verge of an abyss here ;)

~Neels

-- 
- Neels Hofmeyr <nhofmeyr at sysmocom.de>          http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Holger Freyther, Harald Welte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/osmocom-net-gprs/attachments/20160318/373b2b4d/attachment.bin>


More information about the osmocom-net-gprs mailing list