On Wed, Jul 23, 2008 at 6:10 PM, Corey O'Connor <[EMAIL PROTECTED]> wrote:
> My straightforward Haskell solution was:
> ---
> import Text.Regex.Posix
>
> main = do
>f_lines <- readFile "test.out" >>= return . lines
>let duratio
brad.larsen:
> And against gawk 3.1.5:
>
> $ time awk -F: '{sum += 1 / $2} END{print sum}' test.out
> 3155.63
>
> real0m0.197s
> user0m0.184s
> sys 0m0.004s
>
> compared to Don's Haskell version:
>
> $ time ./fastSum < test.out
> 3155.62664377
>
> real0m0.072s
> user0m0
On Wed, Jul 23, 2008 at 2:23 PM, Justin Bailey <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 23, 2008 at 11:10 AM, Corey O'Connor <[EMAIL PROTECTED]> wrote:
>> I still have two questions after all this:
>> - Can I get a Haskell implementation as fast as the Perl?
>> - What do I need to do to get GHC's
And against gawk 3.1.5:
$ time awk -F: '{sum += 1 / $2} END{print sum}' test.out
3155.63
real0m0.197s
user0m0.184s
sys 0m0.004s
compared to Don's Haskell version:
$ time ./fastSum < test.out
3155.62664377
real0m0.072s
user0m0.056s
sys 0m0.004s
compared to the Corey
On Wed, Jul 23, 2008 at 11:10 AM, Corey O'Connor <[EMAIL PROTECTED]> wrote:
> I still have two questions after all this:
> - Can I get a Haskell implementation as fast as the Perl?
> - What do I need to do to get GHC's profiler to provide me usable
> information? Telling me that 98% of the time w
coreyoconnor:
> I have the need to regularly write tiny programs that analyze output
> logs. The output logs don't have a consistent formatting so I
> typically choose Perl for these tasks.
>
> The latest instance of having to write such a program was simple
> enough I figured I'd try my hand at u
Sounds great! Thanks for the advice. :-)
-Corey
On Wed, Jul 23, 2008 at 1:18 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> coreyoconnor:
>> I have the need to regularly write tiny programs that analyze output
>> logs. The output logs don't have a consistent formatting so I
>> typically choose Perl
coreyoconnor:
> I have the need to regularly write tiny programs that analyze output
> logs. The output logs don't have a consistent formatting so I
> typically choose Perl for these tasks.
>
> The latest instance of having to write such a program was simple
> enough I figured I'd try my hand at u
I have the need to regularly write tiny programs that analyze output
logs. The output logs don't have a consistent formatting so I
typically choose Perl for these tasks.
The latest instance of having to write such a program was simple
enough I figured I'd try my hand at using Haskell instead. The