Talk:Algorithm Implementation/Sorting/Insertion sort

Transwiki from wikipedia:Insertion sort implementations
Some content transwikied to this page was originally at Insertion sort implementations.

Here is a copy of the page history: 19:22, 26 May 2006 213.199.128.152 07:14, 5 May 2006 132.231.54.1 (→ML - bold) 07:12, 5 May 2006 132.231.54.1 (→Haskell, shorter - explanation) 07:11, 5 May 2006 132.231.54.1 (→Haskell, shorter - overall structure, complete) 07:09, 5 May 2006 132.231.54.1 (→C# 2.0 - underline) 07:08, 5 May 2006 132.231.54.1 (→Common Lisp - underline) 07:05, 5 May 2006 132.231.54.1 (→Haskell, shorter) 07:04, 5 May 2006 132.231.54.1 (→Haskell, shorter) 00:57, 1 May 2006 BirgitteSB (Wikisource no langer accepts source code) 17:39, 5 March 2006 R. Koot (substituting core implementations) 14:51, 5 March 2006 Splash (replace afd with and  per afd) 08:41, 26 February 2006 Qwertyus m (→Haskell, shorter) 13:48, 24 February 2006 Donhalcon (listed for deletion) 03:17, 18 February 2006 ZeWrestler (→Additional implementations - added Common Lisp implementation) 08:03, 12 February 2006 212.242.32.26 (→Additional implementations) 08:01, 12 February 2006 212.242.32.26 (→Additional implementations) 07:58, 20 January 2006 204.4.130.140 (→Java) 07:57, 20 January 2006 204.4.130.140 (→Java) 19:34, 16 December 2005 Deco (Revert - that's a good addition, but the code is not available under a GFDL-compatible license; see talk page) 18:38, 16 December 2005 64.191.131.194 20:44, 11 December 2005 128.253.69.42 (→Java) 20:21, 8 December 2005 Deco m (→Java - Don't need to initialize j, fix indent) 19:50, 8 December 2005 24.81.68.41 21:39, 28 November 2005 Deco (→Core implementations - How to edit HTML comment) 21:33, 28 November 2005 Deco (Break into core implementations and additional implementations to share content with insertion sort) 00:37, 29 October 2005 RedWolf m (categories) 02:57, 6 October 2005 Grignaak m (Fixed the Java code ~) 22:53, 31 August 2005 65.190.142.219 (→Java) 17:01, 9 August 2005 Deco (→C# 2.0 - Intro) 17:00, 9 August 2005 Deco (Merge content from Insertion sort)

Here is a copy of the talk page:

Removed RealBASIC implementation
I removed an implementation in RealBASIC from a commonly-used library because its license is incompatible with the GPL. Its documentation states:


 * SortLibrary is free for your use in projects (I wouldn't mind a small mention in the about box) and open source, but it is not public domain. All code and documentation © 2001-2005 Charles Yeomans.

He never mentions an explicit license, and the above is so vague that it's impossible to establish whether it's suitable for this use. Try getting him to release it under the GFDL or a non-copyleft license like MIT/X11 or BSD, which are probably compatible. Deco 23:36, 16 December 2005 (UTC)

Articles for Deletion debate
This article was listed for transwikiing and deleting as a result of Articles for Deletion debate. The discussion can be found here. -Splash talk 18:52, 5 March 2006 (UTC)

~ Booya Bazooka 03:42, 27 May 2006 (UTC)

Removed C++ implementation
I removed an implementation in C++ because it was ridiculously badly written. It was thousands times slower than the C version just because the author abused the C++ features in a very evil way! In fact it was so bad, that I wouldn't be surprised if the author did that on purpose to "prove" that C++ programs must be ridiculously slow. Here goes the code as an example how to NOT write programs in C++. As a side note insertion sort has already been provided with the C++ standard library in the header file as std::__insertion_sort and ofcourse it is very fast. In fact it is most often even faster than the C version presented on the wiki page.

Sample timings for an x86, gcc 4.3.0 (-O3), win32 machine for a std::vector consisting of 10000 pseudo-random generated elements (from the range 0 - 9999):

bubble: 0.36s, C-style (wiki) insertion sort: 0.13s, std::__insertion_sort: 0.06s, the sort presented above: 267.13s(!?).

Anonymous83.24.205.241 (talk) 11:02, 11 May 2008 (UTC)

Removed C++ standard library usage example
I've decided to remove the stdlib example presented below, because it doesn't show the implementation of the algorithm. Instead I've put a note informing that such beast as std::__insertion_sort exists.

--Firkraag (talk) 13:25, 12 May 2008 (UTC)

C
The second for loop might be tricky: One can replace the inner block with: Same thing, but easy to take in I find. acagastya   ✍️ Dicere Aliquid  🐾 15:10, 2 February 2016 (UTC)