word-frequency program - Language Shootout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Isaac Gouy

    #1

    word-frequency program - Language Shootout

    Seems like there's a problem with the word-frequency program written
    for "The Great Computer Language Shootout" - it's using 161,500KB
    which is far more than other programs:



    What am I doing wrong?
  • Nikolai Chuvakhin

    #2
    Re: word-frequency program - Language Shootout

    igouy@yahoo.com (Isaac Gouy) wrote in message
    news:<ce7ef1c8. 0411091013.74ac b6e0@posting.go ogle.com>...[color=blue]
    >
    > Seems like there's a problem with the word-frequency program written
    > for "The Great Computer Language Shootout" - it's using 161,500KB
    > which is far more than other programs:
    >
    > http://shootout.alioth.debian.org/be...&id=0&sort=cpu
    >
    > What am I doing wrong?[/color]

    Using preg_split() instead of str_replace() and explode(),
    perhaps?

    Cheers,
    NC

    Comment

    • Isaac Gouy

      #3
      Re: word-frequency program - Language Shootout

      nc@iname.com (Nikolai Chuvakhin) wrote in message[color=blue]
      > Using preg_split() instead of str_replace() and explode(),
      > perhaps?[/color]

      Thanks for the hint - could you sketch out the code please?

      Comment

      Working...