#1560 tsearch is not implemented correctly

closed-invalid
nobody
2011-06-27
2011-06-26
Anonymous
No

OS : Windows Vista
GCC Version 4.5.2

I use tsearch() on Windows and Linux. Performance is really not the same (tsearch() on Linux is infinitely faster).

I looked at the sources, and found that the implementation of tsearch MinGW is an unbalanced tree ...

I replaced the file 'tsearch.c', 'tfind.c', 'tdelete.c' and 'twalk.c' in 'mingwrt-3.18/mingwex' by the version of glibc, with some modifications, and this greatly improved performance (attachement inclued).

Discussion

  • Earnie Boyd
    Earnie Boyd
    2011-06-27

    Since you copied from source with a GPL license we cannot use it. Sorry, but you'll have to use this as a private fix. We must leave our sources in the public domain. Notice that you will now inflict the GPL license on any code you distribute using this modified version go mingwrt.

     
  • Earnie Boyd
    Earnie Boyd
    2011-06-27

    • status: open --> closed-invalid
     
  • Earnie Boyd
    Earnie Boyd
    2011-06-27

    File removed to prevent infection of GPL licensed code to onlookers.