• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

FFS Microsoft

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #41
    Originally posted by Jabberwocky
    Nonsense - it is the job of compilers to do this sort of micro-optimisation.
    Look dude, let me explain it in terms that even you should be able to comprehent:

    a) using Array.Sort in my application made that sorting account for about 75% of runtime for one typical class of data: I know this for certain as I use profiler extensively, it lead me to Microsoft's source

    b) I took source code of Array.Sort and optimised and put into my own class Sorter.Sort - I use same data, every thing else is same: now sorting is less than 10% of run time

    Is that clear? If I could achieve such a major speed up without changing data that was sorted or anything else, then something is bloody wrong if Microsoft can't do it out of the box.

    madhippy: the application in question is a search engine that should scale as efficiently as possible to billions of pages.

    Comment


      #42
      Originally posted by AtW
      madhippy: the application in question is a search engine that should scale as efficiently as possible to billions of pages.
      I see ... wonder what the mono implementation is like ?

      Comment


        #43
        Originally posted by AtW
        Look dude, let me explain it in terms that even you should be able to comprehent:

        a) using Array.Sort in my application made that sorting account for about 75% of runtime for one typical class of data: I know this for certain as I use profiler extensively, it lead me to Microsoft's source

        b) I took source code of Array.Sort and optimised and put into my own class Sorter.Sort - I use same data, every thing else is same: now sorting is less than 10% of run time

        Is that clear? If I could achieve such a major speed up without changing data that was sorted or anything else, then something is bloody wrong if Microsoft can't do it out of the box.

        madhippy: the application in question is a search engine that should scale as efficiently as possible to billions of pages.
        Look my Russian poodle - any old muppet can optimise a piece a code for their application - so what ? It doesn't mean microsoft should do it for a general programming routine - and the swapping didn't give you such a speed up did it ? So what revolutionary technique did monkey boy ?

        And don't be afraid to get technical cos I have a PhD in Computer Science for my sins ....

        Comment


          #44
          Jabber - you are a retard of the highest order, comparing to you Dundee is a reasonable person and Mailman is like a genious.

          madhippy: that's a good question, I've got stuff ported to Mono but I have not checked their implementation. I am willing to bet they have similar issue as Microsoft: see they use Array.Sort for non-specific object keys, ie: object[], this makes it a convinient one function to write and one call to make, but because you don't know exact type it means slower comparisons! It makes much more sense to have Array.Sort implementations for all primitive data types: int[], byte[], short[] etc - this kind of thing can be achieved using Generics in .NET 2.0, but having exact types is always better, there are some other things in their code too like they have one function that deals with both sorting keys, but no values associated with them, and keys with values - so they check if values are null every time in loop instead of checking it once at start of sorting and going to the right path - sounds strange but when you have tight loop you definately don't want IFs there that can be taken out, its basics of optimisation.

          Comment


            #45
            Originally posted by AtW
            Jabber - you are a retard of the highest order, comparing to you Dundee is a reasonable person and Mailman is like a genious.

            madhippy: that's a good question, I've got stuff ported to Mono but I have not checked their implementation. I am willing to bet they have similar issue as Microsoft: see they use Array.Sort for non-specific object keys, ie: object[], this makes it a convinient one function to write and one call to make, but because you don't know exact type it means slower comparisons! It makes much more sense to have Array.Sort implementations for all primitive data types: int[], byte[], short[] etc - this kind of thing can be achieved using Generics in .NET 2.0, but having exact types is always better, there are some other things in their code too like they have one function that deals with both sorting keys, but no values associated with them, and keys with values - so they check if values are null every time in loop instead of checking it once at start of sorting and going to the right path - sounds strange but when you have tight loop you definately don't want IFs there that can be taken out, its basics of optimisation.
            Marvellous - so you remove and abstraction and error checking - brilliant - I am sure Microsoft have never thought of that. I have though - it is fu*king obvious - as are you our Russian tulipemeister.

            Comment


              #46
              Originally posted by Jabberwocky
              I am sure Microsoft have never thought of that.
              Look retard its like this: I use Array.Sort provided by Microsoft and I get 75% of app time used by their sorting, now I use my Sorter.Sort with the same data and sorting only takes 10% of the time: I don't care what you or anyone else think about it - for me the change was more than justified and I can only express pity that these obvious things were not done by Microsoft in the first place as otherwise a lot more people would have benefited from faster apps.

              Comment


                #47
                Originally posted by AtW
                Look retard its like this: I use Array.Sort provided by Microsoft and I get 75% of app time used by their sorting, now I use my Sorter.Sort with the same data and sorting only takes 10% of the time: I don't care what you or anyone else think about it - for me the change was more than justified and I can only express pity that these obvious things were not done by Microsoft in the first place as otherwise a lot more people would have benefited from faster apps.
                Most people do not need faster apps - they need apps that work reliably diptulip.

                Comment


                  #48
                  The changes that I made do not sacrifice reliability, in fact its going to be more reliable because it runs faster.

                  Comment


                    #49
                    Originally posted by AtW
                    The changes that I made do not sacrifice reliability, in fact its going to be more reliable because it runs faster.
                    Bollocks reliability has nothing to do with execution speed. Do you catch all exceptions ?

                    Comment


                      #50
                      Cocky - go look at something shiny for a moment, this thread is for adults with IQ over than 80.

                      Comment

                      Working...
                      X