FFS, had to dig into .NET source code to rewrite their Array.Sort code that was slow as a dog. Dim - what's their address to send invoice to?
- 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
-
-
-
-
Comment
-
Originally posted by AtWFFS, had to dig into .NET source code to rewrite their Array.Sort code that was slow as a dog. Dim - what's their address to send invoice to?Comment
-
Another FFS Microsoft....
http://www.youtube.com/watch?v=fV1kqthZf2g
Vista and speech recog...
I really don't understand why MS Product Managers do this to themselves...Comment
-
I improved the code but more importantly made sure the right sorter gets called, look at their source here, line 00844.
Notice that they would try to use non-.NET SZsort first, if it fails or some conditions set then they will try SorterObjectArray - this is much slower, but still okay, but they may also fall to the slowest piece of sh1t of a code SorterGenericArray: in profiler I could see that they were falling to it without good reason. So I took SorterObjectArray code and made sure it works with explicit types to allow compiler made optimisations, unlike ******** Microsoft programmers I am not lazy to copy paste same code with small changes to mak esure its optimised to the max. Say look at their code checking for presense of items:
if (items != null)
{ // do stuff
}
They do it in one tight loop, ffs, you can check it ONCE before calling that code and decide to call correct path to avoid making comparison that will yield same result all the time, ffs, sometimes copy/paste/lil-change approach is the best way to max performance.
FFS, and look at SorterObjectArray - because they forced Array.Sort to deal with arrays type of object[] it means they had to use Comparer, thus calling Int32 comparer on object rather than creating dozen copies of Array.Sort to deal with ALL primitive type combinations. FFS, this is obvious and certainly no excuse not to do in the base library that must be ultra fast!!!
It pissed me off big time that they were calling the slowest sorter of them all when I tried to sort int[],int[] arrays ffs, the difference is so big that its criminal to not spend 1 days making sure sorting is lighting fast - the base library code is not written for show of how one big superfunction can do it all ffs.Last edited by AtW; 1 August 2006, 14:41.Comment
-
-
I know better, but I am not the best programmer out there - .NET is done well, but its appauling to see such obvious lack of optimisations: clearly programmer optimised for his own writing time, ie think less and write just one easily maintainable version of Sorter, so he used object[] params, rather than specific int[] params (which is kind of done using Generics in .NET 2.0 but hard coded types are always better performance wise), also annoying that IF statement that will always be used but could have only checked once, its a recursive function ffs, and its sorting so clearly performance in this area is important especially because everyone is using same algorithm (quicksort), so optimising implementation is totally essential: I've done this small rewrite and sorting dropped off my radar now so I can look at other parts of my code. Bastards.Comment
-
Comment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Comment