• 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!

Anyone used x86 assembly in .NET?

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

    Anyone used x86 assembly in .NET?

    I thought so!

    #2
    Technical please.

    Comment


      #3
      If I were having to resort to using assembly language in order to meet some kind of performance target, I would not have used .NET in the first place.

      Comment


        #4
        I've used x86 assembly in Visual Studio .NET.

        Then I had to take it out again because the gcc build under Linux didn't support it.
        Will work inside IR35. Or for food.

        Comment


          #5
          Originally posted by DimPrawn
          If I were having to resort to using assembly language in order to meet some kind of performance target, I would not have used .NET in the first place.
          Its a very short sighted approach: I have got over 150k lines in C#, but I plan to use assembly only for 1% of it in very specific isolated cases that I know need it: if I used C++ (as you imply here) then it would have costed me twice as much in debugging time, at least with 99% of code running at better speed, but its already good enough - its the 1% that needs asm optimisation. Today I checked actual x86 code generated by JIT in .NET for the function that I want to rewrite in assembly and it was really looking bad - really crap generated code with extremely poor usage of registers, and I was hoping that the damn thing would realise that some local vars can be safely put into registers as nothing else would access them.

          Stay tuned for my report on performance improvement that I plan to realise tomorrow.

          Comment


            #6
            I'm only interested in scalability.

            Customer wants 100% performance increase? I just add another server.


            Comment


              #7
              Why didn't you design and build your our processor core and associated instruction set and language, Alexei? The engineers who work for Intel, AMD, Microsoft etc seem to have really missed these obvious flaws in their architectures - looks like you could teach them a thing or two ...
              Vieze Oude Man

              Comment


                #8
                Its not feasible for me to build new processors, but I can optimise to fairly low level - I expect at least 500% speed up from that 1% of source code rewrite in assembly, possibly more - this is very high number that can't be ignored. And of course I improved everything algorithmically and it all supports multiple cores and servers, so stratigically its scalable but I also want to maximise gain from single cPU.

                Comment


                  #9
                  Originally posted by AtW
                  Its not feasible for me to build new processors, but I can optimise to fairly low level - I expect at least 500% speed up from that 1% of source code rewrite in assembly, possibly more - this is very high number that can't be ignored. And of course I improved everything algorithmically and it all supports multiple cores and servers, so stratigically its scalable but I also want to maximise gain from single cPU.
                  It's this sort of statement that makes me very nervous, wet my pants and make me go blubbling back to cleaning peoples cars for being exposed as an IT sham....

                  All Hail the techno-AtW!
                  If you think my attitude stinks, you should smell my fingers.

                  Comment


                    #10
                    Looking at disassembly of that loop and the code generated by VS 2005 is really - they seem to just do work for given line of code then save it into memory, rather than look at most optimal organisation of registers for a FEW lines - this would avoid very costly memory writes/reads.

                    Oh well, now its time for hand optimised assembly work!

                    Comment

                    Working...
                    X