Slashdot Mirror


User: batessr

batessr's activity in the archive.

Stories
0
Comments
5
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 5

  1. Re:Nice and all on Genetic Algorithm Improves Shellsort · · Score: 1
    Another example:, quicksort is poor at sorting strings. This is because you have to perform a full strcmp() (or equivalent) at each comparison. For this reason, a modified radix sort is often used.



    Radix sort is also not very good at sorting strings. Radix sort requires O(nk) where k equals the number of radix points. If one sorts a list names from the phone book, the keys in this case can have over 30 radix points. Since 2^32 is over 4 billon a quicksort can sort better than a radix sort as long as there are less than 1 billon names to be sorted in this case.


    Also strcmp is not that slow over all. Since there are far far more people not named John Smith then there are that are named John Simth, strcmp() will complete the vast majority of it's calls in just a few operations.


    Radix sort can not be done in place, thus requiring double the memory to run (will at least for the pointers which for a large list can still be quite a cost). If this addition memory needs to be swapped in and out the performance penalty can be quite nasty.


    Radix sort is best used when the number of radix points is quite small such as zip codes (only 5 radix points). In general this only happens when a large number of items have only a few keys. This prevents radix sort from being a good general purpose sort.


    Quicksort with a good pivot selection algorithm (to avoid the already sorted list problem) or Mergesort are still used quite often today.
    In fact the Java library sort uses a modified mergesort, and the standard C library has qsort().


    I did check Knuth about this, and radix sort can get around its problems with a beefy machine. I did some checking and in fact radix is standard for supercomputers. So if you are programming a Cray or whatever they call them now days you can ignore everything I have said.

  2. Re:This approach is very easy to defeat on Paul Graham on Fighting Spam · · Score: 1

    This filter will work on the technique you describe. After the user files some of the messages as spam, the words multipart, alternative, and img would all be added to the bad corpus. And since almost no non-spam will be multipart/alternative with a text and HTML part, the filter should adapt extremely well.

  3. Re:Courses cost money, knowledge only dedication. on Options for Adults with Renewed Interest in Math? · · Score: 1

    I would not knock formal education so quickly. Formal education provides one important resource that self education does not, an instructor. Instructors in formal education or mentors in informal education can allow someone to learn far more quickly than self education with discipline alone. I have always notice in learning everything from computer science to pinball, than people who learn with more experienced people to aid them always learn faster than those who do not have such aid.

  4. Re:Power! on What Makes a Powerful Programming Language? · · Score: 1

    Here's my power language:

    LD - Load Register
    ST - Store Register
    CMP - Compare Register
    BNE - Branch not equal

    And just throw in a few in arithmetic operators:
    INC - Increment Register
    ADD - Add to Register

    That's all you ever need.
    I'm from a school that likes the basics, but what do I know I'm over 30.

  5. Re:the killer apps... on Searching For Essay on Innovation, UNIX and C? · · Score: 1

    I remember back at CMU in 1990 we used an xwindows program called zypher that was an IM app. So there was IM before the web.