{"action":"created","issue":{"url":"https://api.github.com/repos/JBontes/FastCode/issues/1","labels_url":"https://api.github.com/repos/JBontes/FastCode/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/JBontes/FastCode/issues/1/comments","events_url":"https://api.github.com/repos/JBontes/FastCode/issues/1/events","html_url":"https://github.com/JBontes/FastCode/issues/1","id":90770954,"number":1,"title":"Very Interesting! How to use in TList<T>.Sort() ??","user":{"login":"tueddy","id":11274319,"avatar_url":"https://avatars.githubusercontent.com/u/11274319?v=3","gravatar_id":"","url":"https://api.github.com/users/tueddy","html_url":"https://github.com/tueddy","followers_url":"https://api.github.com/users/tueddy/followers","following_url":"https://api.github.com/users/tueddy/following{/other_user}","gists_url":"https://api.github.com/users/tueddy/gists{/gist_id}","starred_url":"https://api.github.com/users/tueddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tueddy/subscriptions","organizations_url":"https://api.github.com/users/tueddy/orgs","repos_url":"https://api.github.com/users/tueddy/repos","events_url":"https://api.github.com/users/tueddy/events{/privacy}","received_events_url":"https://api.github.com/users/tueddy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"JBontes","id":11998466,"avatar_url":"https://avatars.githubusercontent.com/u/11998466?v=3","gravatar_id":"","url":"https://api.github.com/users/JBontes","html_url":"https://github.com/JBontes","followers_url":"https://api.github.com/users/JBontes/followers","following_url":"https://api.github.com/users/JBontes/following{/other_user}","gists_url":"https://api.github.com/users/JBontes/gists{/gist_id}","starred_url":"https://api.github.com/users/JBontes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JBontes/subscriptions","organizations_url":"https://api.github.com/users/JBontes/orgs","repos_url":"https://api.github.com/users/JBontes/repos","events_url":"https://api.github.com/users/JBontes/events{/privacy}","received_events_url":"https://api.github.com/users/JBontes/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-06-24T20:15:54Z","updated_at":"2015-07-12T13:00:42Z","closed_at":null,"body":"Hello,\r\n\r\nthis is a very interesting fastcode project! I assume that this can avoid a big bottlenecks, but i'm not that generics expert. I just heavy use standard generic lists..\r\nMy question: How to use it in generic TList<T>.Sort()?\r\nI have already made the comparer global to avoid allocation on every call. This is my code:\r\n\r\nvar\r\n  //compare by ZOrder\r\n  ZOrderComparer: IComparer<TCustomGraphic>;\r\n\r\nbegin\r\n    if not Assigned(ZOrderComparer) then\r\n    ZOrderComparer:= TComparer<TCustomGraphic>.Construct(\r\n      function (const Item1, Item2 : TCustomGraphic) : integer\r\n      begin\r\n        Result := Item1.ZOrder - Item2.ZOrder;\r\n      end\r\n    );\r\n\r\n    FList.Sort(ZOrderComparer);\r\nend;\r\n\r\nAdding FastDefaults to uses clause bring incompatible types IComparer<T> and TComparer<T>\r\nI wonder how to add or use FastDefaults here? \r\n\r\nThanks in advance\r\nDirk\r\n"},"comment":{"url":"https://api.github.com/repos/JBontes/FastCode/issues/comments/120719140","html_url":"https://github.com/JBontes/FastCode/issues/1#issuecomment-120719140","issue_url":"https://api.github.com/repos/JBontes/FastCode/issues/1","id":120719140,"user":{"login":"JBontes","id":11998466,"avatar_url":"https://avatars.githubusercontent.com/u/11998466?v=3","gravatar_id":"","url":"https://api.github.com/users/JBontes","html_url":"https://github.com/JBontes","followers_url":"https://api.github.com/users/JBontes/followers","following_url":"https://api.github.com/users/JBontes/following{/other_user}","gists_url":"https://api.github.com/users/JBontes/gists{/gist_id}","starred_url":"https://api.github.com/users/JBontes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JBontes/subscriptions","organizations_url":"https://api.github.com/users/JBontes/orgs","repos_url":"https://api.github.com/users/JBontes/repos","events_url":"https://api.github.com/users/JBontes/events{/privacy}","received_events_url":"https://api.github.com/users/JBontes/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T13:00:42Z","updated_at":"2015-07-12T13:00:42Z","body":"where’s the code that uses fastdefaults?\r\nplease post that and I'll see where the problem is. \r\nnote there’s little I can do to speed up the comparisons of integers. \r\nfor that you need the inline comparers. \r\nalso I'm working on a faster quicksort, the current one it a bit long in the tooth. \r\nit's in the string routines that the main gains are. "}}