Results 1 to 4 of 4

Thread: Are any compressors allocation-bound?

  1. #1
    Member
    Join Date
    May 2015
    Location
    UK
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Are any compressors allocation-bound?

    Are there any compressors which do a lot of allocation, like new/delete or malloc(sizeof(struct)) and whose speed is restricted by those allocations?

    For example anything involving trees... Like a binary-tree.

    I wrote a new allocation library and I want to test if it can speed up any significant well-known(ish) compressor... seeing as I'm also interested in compression!

    If not, thats fine. I already know that most systems use a hash-table, which obviously doesn't need any special allocation code.

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    Any high-performance algorithm (not only compression ones) usually performs its own memory management, even if it works with trees or so

  3. The Following User Says Thank You to Bulat Ziganshin For This Useful Post:

    AARRRGG (10th May 2019)

  4. #3
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,134
    Thanks
    179
    Thanked 921 Times in 469 Posts
    Yeah, no luck. I checked some possible candidates like DMC and nelson-comp2, and PPMZ,
    but even these use memory pools.

    And, well, its easy to understand, since malloc adds plenty of overhead and even storing a pointer as is can be frequently inefficient.

    Any LZ compressors are not even worth consideration, and for DMC/PPM you can probably make a version that would use malloc
    rather than its own memory pool, but its not trivial, since its also necessary to change how pointers are stored in tree nodes.

    Maybe you can try https://github.com/schnaader/precomp-cpp
    I think it uses malloc relatively frequently in runtime.

  5. The Following User Says Thank You to Shelwien For This Useful Post:

    AARRRGG (10th May 2019)

  6. #4
    Member
    Join Date
    May 2015
    Location
    UK
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Bulat Ziganshin View Post
    Any high-performance algorithm (not only compression ones) usually performs its own memory management, even if it works with trees or so
    I see. Thanks for the reply. I was thinking it may be this way.

Similar Threads

  1. Kanzi: Java, Go and C++ compressors
    By hexagone in forum Data Compression
    Replies: 18
    Last Post: 10th July 2019, 02:20
  2. LZO affects other compressors
    By Earl Colby Pottinger in forum Data Compression
    Replies: 2
    Last Post: 30th June 2014, 02:43
  3. Some of my toy compressors
    By RichSelian in forum Data Compression
    Replies: 27
    Last Post: 6th October 2011, 05:09
  4. image compressors
    By maadjordan in forum Forum Archive
    Replies: 5
    Last Post: 13th August 2007, 09:28
  5. Fastest Compressors
    By LovePimple in forum Forum Archive
    Replies: 0
    Last Post: 1st November 2006, 06:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •