Slashdot Mirror


Computer Program Fixes Old Code Faster Than Expert Engineers

An anonymous reader writes: Less than two weeks after one group of MIT researchers unveiled a system capable of repairing software bugs automatically, a different group has demonstrated another system called Helium, which "revamps and fine-tunes code without ever needing the original source, in a matter of hours or even minutes." The process works like this: "The team started with a simple building block of programming that's nevertheless extremely difficult to analyze: binary code that has been stripped of debug symbols, which represents the only piece of code that is available for proprietary software such as Photoshop. ... With Helium, the researchers are able to lift these kernels from a stripped binary and restructure them as high-level representations that are readable in Halide, a CSAIL-designed programming language geared towards image-processing. ... From there, the Helium system then replaces the original bit-rotted components with the re-optimized ones. The net result: Helium can improve the performance of certain Photoshop filters by 75 percent, and the performance of less optimized programs such as Microsoft Windows' IrfanView by 400 to 500 percent." Their full academic paper (PDF) is available online.

13 of 167 comments (clear)

  1. Re:Nirvana?! by JMJimmy · · Score: 5, Insightful

    Unemployment is a sort of nirvana.

    I just want to know why when they improve the speed of something by 75-500% it's considered research but when I do it it's considered a waste of time? Companies just don't appreciate efficiency.

  2. its been around for years. by nimbius · · Score: 5, Funny

    This kind of application has been ported to about half a dozen different operating systems. i use it on a regular basis but for those not familiar I find it works best with legacy PHP. the "rm" command (or as its known in windows "del") uses an advanced algorythm to determine the target codes age, total number of lines, and any optimizations that are required in order to make it fully web 4.0 SOAP, ROPE, and DOPE compliant. It then quickly converts the code to the updated version by changing the physical structure of the space it occupies on the disk. My coworkers always seem amazed when they see me break out my legacy optimizer. "What have you done?!" they exclaim, baffled at my efficiency. "holy crap do you know how important that was?!?" they remark in awe

    --
    Good people go to bed earlier.
  3. Re:Improving the performance by more than 100% by Bengie · · Score: 4, Informative

    100% faster just means 2x.

  4. Re:Support and copyright ... by gstoddart · · Score: 4, Funny

    What? There is no law against modifying binaries on software you own.

    These days, copyright means whatever the hell corporations tell government it means, and it's a constantly moving target.

    I'm not convinced the BSA would agree.

    The quality of comments on this site continues to decline at a rapid pace...

    Yeah, it's full of snide assholes posting as Anonymous Coward who don't have anything intelligent to add.

    --
    Lost at C:>. Found at C.
  5. Inaccurate title by CustomSolvers2 · · Score: 5, Interesting

    The paper is not about automatic code optimisation in general. This program only fixes image-related algorithms (which most likely involve simple & repetitive modifications).
    In fact, there are quite a few references to Adobe in the associated links and the paper is signed by two Adobe guys. Thus, I guess that it is mostly focused on Adobe products, like Photoshop; and might not even be able to deal with any image-processing algorithm.

    PS: is it because of the summer-period lack of news or Slashdot is planning to make the move to pure sensationalism? Because a big proportion of the titles lately are quite unclear (to say it softly).

    --
    Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
  6. So has it "fixed" itself? by Viol8 · · Score: 4, Interesting

    Well its the obvious question isn't it - presumably they've eaten their own dog food and run the program on its own binary , right?

  7. Re:Improving the performance by more than 100% by randm.ca · · Score: 4, Insightful
    Am I having an English fail, or are they having a Math fail?

    Mr. Smith's salary has increased by 350% over the past 20 years. If his original salary was $22,000 per year, what is his current salary?
    First change 350% to a decimal: 350% = 3.5
    Next, multiply the original salary by the decimal number: (22000) x (3.5) = 77000
    After 20 years Mr. Smith's salary has increased from $22,000 to $77,000 per year.

    Didn't his salary increase by $77,000, from $22,000 to $99,000?

    To simplify it, if his salary had increased by 100% would that mean he was now making $22,000 (their logic) or $44,000 (my logic)?

  8. Re:Nirvana?! by quantumghost · · Score: 5, Funny

    $ Helium -i Helium -o Helium2

    Program ran in 656.76s

    $ Helium2

    Welcome to SkyNET

  9. Remember Transmeta? by Anonymous Coward · · Score: 5, Informative

    When you read the actual paper, it seems to analyse the code, and take advantage of vectorization in modern hardware to do the equivalent act in a more parallel way increasing performance. So it strips off local optimization, analyses the action, then recreates it in a form better suited to the processor its compiled for, resulting in a speedup.

    Sort of reminds me of Transmeta, the processor Linus was involved with, that ran microcode, analysed the execution of the x86 code, and did little mini compiles of microcode to simulate that. aka 'Code Morphing',

    https://en.wikipedia.org/wiki/Transmeta

    It did well on Benchmarks (and filters) because of the repetitive nature of them, it could recreate those loops more efficiently.

    Interesting, pity its all full of boastful fluff, and vague bitrot claims, it sounds like a proper paper otherwise. Of course for most software if it has value, it is a competition and its worth re-optimizing for each new platform otherwise you lose market to competitors. So actual programmers would rework those parts of the code rather than a general tool hack.

    So this would only be a stopgap for dead end software you're locked into that isn't being maintained.

  10. Re:Support and copyright ... by mark-t · · Score: 5, Informative

    Actually, copyright is violated when you copy the work without permission and the purpose for copying the work does not otherwise make it exempt from infringement. If you don't distribute at all, and you do not profit from it in any way, then nobody else is necessarily even going to know you copied it, let alone want to prosecute you for it, but that does not necessarily mean it is necessarily legal (some jurisdictions even have private copying as exempt from infringement anyways, or for example, in Canada, have private-use copying exempt only so long as a mechanism for compensating at least some percentage private-use copies exists, such as levies on blank media where such copied content is considered by said controlling agencies to be likely to be copied onto).

    Distribution of unauthorized copies is usually taken as gold-bar standard proof of infringement, since it establishes, in an objectively verifiable way, a non-private-use purpose for making those copies which can be presented by the copyright holder as a basis for the claim against the infringer. The action of distributing unauthorized copies is generally considered illegal as well, a crime related to infringement and no less than at least evidence of conspiracy to commit copyright infringement, but is not technically copyright infringement, not is it absolutely required to commit infringement... at most it may only be required to be held accountable for infringement.

  11. It's a general purpose optimizer by Virtucon · · Score: 3, Informative

    Read the instructions, loop optimize, branch optimize etc. rinse repeat. It's not novel, I mean we've had JIT optimization and others for a few years now. It does nothing with "code" but with the binaries generated from code.

    --
    Harrison's Postulate - "For every action there is an equal and opposite criticism"
  12. Re:Bit-rotted code by swillden · · Score: 4, Informative

    Is that even a thing? How do bits rot?

    Yes, it's a thing. An important one, well-known to all software developers with a few years of experience.

    Barring some sort of hardware failure the bits themselves don't change, of course. What changes is the context in which the bits are used. The article seems to be focusing mostly on performance, and that's one area of bit rot, a minor one. As hardware changes, the best performance optimization methods change, but the bits don't. Updating the code can improve performance. More important forms of bit rot have to with supporting libraries, or even business context. Causes and effects vary, but at bottom some assumption made by the old code is no longer true. If the assumption was never true, or for some reason the developer should not have expected it to be true, we call this a bug. But sometimes the code did make perfect sense as it was... but no longer. It's a bug now, but was correct previously.

    That is bit rot.

    Wikipedia has a fairly decent article if you want to read more: https://en.wikipedia.org/wiki/...

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  13. Re:Um, because this is a computer doing the work by Anonymous Coward · · Score: 5, Insightful

    If you look at how their system works, you can see that it is limited to certain types of algorithm, and even then it gives absolutely zero correctness guarantees. What they want to do is abstract and complex. What they're actually doing can be described in a 20-page paper. Your job is safe for right now. Strong AI still doesn't exist.

    Anyway, even if they automate some parts of your job, the part of your job that isn't automated will expand to fill that time. I'm not sure if there's a real law for that but it's a heuristic observation shared by many. Partial automation doesn't lead to declining workforces, it leads to expanded capability and larger workloads than could be imagined before. Even if they perfected this program it still couldn't write a new kernel, let alone a new application.