News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Shellsort and optimization

Started by Geryon, September 24, 2005, 11:10:44 PM

Previous topic - Next topic

Geryon

i'm working on sorting algortihms and i found strange code for Shell sort in The Art Of Programming Volume 3 (Donald E. Knuth) it'a self modifying code for NIX machine. Now i have lots of questions in my head.
What do you thing about self modifying codes ? Is it good for  speed/size optimization ? would you give some samples ?
What is the basic tricks ?

Thank for your interested and i'm sorry for my garbage english.


hutch--

Geryon,

Just code it up and see if it works OK. The fastest shell sort I have seen is a design by Janet Incerpi and Robert Sedgewick and I have the example floating around somewhere but note that a shell sort can be beaten for speed by a quick sort and can be beaten for robustness in terms of data ordering by a variety of other designs.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Geryon

Quote from: hutch-- on September 24, 2005, 11:35:50 PM
Just code it up and see if it works OK.
really ?! do you read all of the my post ?
Quote from: hutch-- on September 24, 2005, 11:35:50 PM
The fastest shell sort I have seen is a design by Janet Incerpi and Robert Sedgewick and I have the example floating around somewhere but note that a shell sort can be beaten for speed by a quick sort and can be beaten for robustness in terms of data ordering by a variety of other designs.
ok i will search this at google

hutch--

I found it. You have the C algo it was derived from, a manually optimised version and an unoptimesed version to play with.

[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php