Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. High-level optimizations

High-level optimizations

Scheduled Pinned Locked Moved The Lounge
cssquestion
11 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CaptainSeeSharp
    wrote on last edited by
    #1

    Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient? I don't mean unraveling loops and doing the obvious, I mean breaking down the most fundamental mechanism of the code and showing you alternatives that require less code. This type of tool would be extremely useful. I think the best way to do this would be to abstract and break down a program into common functioning points that fit in together mathematically with eachother and can be manipulated mathematically as a whole. An equation of sorts.

    Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

    R C M R L 5 Replies Last reply
    0
    • C CaptainSeeSharp

      Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient? I don't mean unraveling loops and doing the obvious, I mean breaking down the most fundamental mechanism of the code and showing you alternatives that require less code. This type of tool would be extremely useful. I think the best way to do this would be to abstract and break down a program into common functioning points that fit in together mathematically with eachother and can be manipulated mathematically as a whole. An equation of sorts.

      Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

      R Offline
      R Offline
      RichardM1
      wrote on last edited by
      #2

      The getting to the original code and parsing it is roughly simple. The part about finding a better way to do it is hard. People have a hard time understanding intent and simplifying other people's code. I have been messing with semantic understanding lately, and capturing semantic patterns is tough.

      Opacity, the new Transparency.

      1 Reply Last reply
      0
      • C CaptainSeeSharp

        Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient? I don't mean unraveling loops and doing the obvious, I mean breaking down the most fundamental mechanism of the code and showing you alternatives that require less code. This type of tool would be extremely useful. I think the best way to do this would be to abstract and break down a program into common functioning points that fit in together mathematically with eachother and can be manipulated mathematically as a whole. An equation of sorts.

        Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        The only level on which this is remotely possible, is the level on which .NET can take the same code, and optimise it for the type of processor being used. That is, a way where the code is compiled to something that's intermediate and designed for such optimisation.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        L 1 Reply Last reply
        0
        • C CaptainSeeSharp

          Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient? I don't mean unraveling loops and doing the obvious, I mean breaking down the most fundamental mechanism of the code and showing you alternatives that require less code. This type of tool would be extremely useful. I think the best way to do this would be to abstract and break down a program into common functioning points that fit in together mathematically with eachother and can be manipulated mathematically as a whole. An equation of sorts.

          Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

          M Offline
          M Offline
          Mark Hurd
          wrote on last edited by
          #4

          I don't see a program doing this for a long time (probably never*), but one way this can be performed by a human is to re-solve the problem in a different programming language. (*)Most existing "low-level" (and higher-level) optimisations can already solve many problems better than can be written in the source programming language. Regards, Mark Hurd, B.Sc.(Ma.) (Hons.)

          1 Reply Last reply
          0
          • C CaptainSeeSharp

            Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient? I don't mean unraveling loops and doing the obvious, I mean breaking down the most fundamental mechanism of the code and showing you alternatives that require less code. This type of tool would be extremely useful. I think the best way to do this would be to abstract and break down a program into common functioning points that fit in together mathematically with eachother and can be manipulated mathematically as a whole. An equation of sorts.

            Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            CaptainSeeSharp wrote:

            Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient?

            That's what the optimizer does. :rolleyes:

            “Follow your bliss.” – Joseph Campbell

            1 Reply Last reply
            0
            • C CaptainSeeSharp

              Is there any way possible for a computer program to "see" what your code does, and rewrite it to be more efficient? I don't mean unraveling loops and doing the obvious, I mean breaking down the most fundamental mechanism of the code and showing you alternatives that require less code. This type of tool would be extremely useful. I think the best way to do this would be to abstract and break down a program into common functioning points that fit in together mathematically with eachother and can be manipulated mathematically as a whole. An equation of sorts.

              Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              There is a design methdology called Z which attempts to do what you say but from the outset rather than as a reverse engineer. Needless to say it is of accademic interest only. So no, there isnt a way. And this is why the human brain will never be replaced by a machine. Machines just do not have the imnagination to look at a problem, come up with a number of solutions and thenm select the best one.

              Morality is indistinguishable from social proscription

              C 1 Reply Last reply
              0
              • C Christian Graus

                The only level on which this is remotely possible, is the level on which .NET can take the same code, and optimise it for the type of processor being used. That is, a way where the code is compiled to something that's intermediate and designed for such optimisation.

                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Thats very average optimisation and has been around for ages with the VC compiler for example.

                Morality is indistinguishable from social proscription

                1 Reply Last reply
                0
                • L Lost User

                  There is a design methdology called Z which attempts to do what you say but from the outset rather than as a reverse engineer. Needless to say it is of accademic interest only. So no, there isnt a way. And this is why the human brain will never be replaced by a machine. Machines just do not have the imnagination to look at a problem, come up with a number of solutions and thenm select the best one.

                  Morality is indistinguishable from social proscription

                  C Offline
                  C Offline
                  CaptainSeeSharp
                  wrote on last edited by
                  #8

                  I disagree with all of you. I see a way for it to be possible, it's just complicated.

                  Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

                  L 1 Reply Last reply
                  0
                  • C CaptainSeeSharp

                    I disagree with all of you. I see a way for it to be possible, it's just complicated.

                    Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    CaptainSeeSharp wrote:

                    I disagree with all of you. I see a way for it to be possible, it's just complicated.

                    Will there be a tutorial?

                    C 1 Reply Last reply
                    0
                    • L Lost User

                      CaptainSeeSharp wrote:

                      I disagree with all of you. I see a way for it to be possible, it's just complicated.

                      Will there be a tutorial?

                      C Offline
                      C Offline
                      CaptainSeeSharp
                      wrote on last edited by
                      #10

                      No because it's worth too much money to give away.

                      Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

                      L 1 Reply Last reply
                      0
                      • C CaptainSeeSharp

                        No because it's worth too much money to give away.

                        Watch the Fall of the Republic (High Quality 2:24:19)[^] Sons Of Liberty - Free Album (They sound very much like Metallica, great lyrics too)[^]

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        CaptainSeeSharp wrote:

                        No because it's worth too much money to give away.

                        SO your going to get rich? nice one!

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups