Algorithm for Packing Registers?

nobull_at_mail.com
Date: 07/28/04

  • Next message: dede: "Problem with autoflush on Semaphore-threads for Windows"
    Date: 28 Jul 2004 05:27:00 -0700
    
    

    Google won't let me post this as a follow-up but lynch@agere.com (lynto) wrote in message news:<503469eb.0407271148.7ee4b0ca@posting.google.com>...

    > Does anyone have an algorithm for packing registers?

    Algorithms are language independant so this question is off topic in
    comp.lang.

    It appears that you are taking about the famous "packing problem"[1]
    which is, I believe, fairly trivially, mathematically equivalent to
    the even more famous "travelling salesman" problem. These in turn are
    less trivially equivalent to a whole class of mathematical problems
    known as NP-complete.

    [1] Aka bucketizing, aka backback problem, aka...

    There are no known alorithms, other than bute force, that ensure
    optimal solutions to NP-complete problems. (I'm not sure if it has
    actually been proven that there cannot exist any such algoritms - you
    should ask a mathemetician).

    Many books and papers have been written on the subject of algorithms
    to find reasonably good solutions, most of the time, in a reasonable
    time, to NP-complete problems.

    > Any ideas?

    Perhaps you are looking of a Perl _implementation_ of such an
    algorithm.

    A quick glance on CPAN turned up Algorithm::Bucketizer but I have no
    idea how good it is.

    This newsgroup does not exist (see FAQ). Please do not start threads
    here.


  • Next message: dede: "Problem with autoflush on Semaphore-threads for Windows"