HN user

sehe

2 karma
Posts0
Comments6
View on HN
No posts found.

O hey, just found the heap profiling runs.

As you can see, the C++ version uses much less memory (also the C version by the OP uses 73MB - whoa; The OCaml#3 might report 12MB, but the C++ version clocks in at just 12KB. I'm guessing he C++ version would use the same order of magnitude as the OCaml#3 on comparable input sets, though)

    Command:            ./c-version
    Massif arguments:   (none)
    ms_print arguments: massif.out.18434
    
        MB
    73.22^#                                                                       
         |#                                                                       
         |#                                                                       
         |#                                                                       
         |#                                                                       
         |#                                                           :           
         |#                                                           :           
         |#:::::::::::::                                              :           
         |#: :::::::::::::@::::@::::::@::                             :           
         |#: :::::::::::::@::::@::::::@:::@::::@:::@::::              :           
         |#: :::::::::::::@::::@::::::@:::@::: @:::@::::::::::@::::   :           
         |#: :::::::::::::@::::@::::::@:::@::: @:::@::::::::::@::::::@::::::      
         |#: :::::::::::::@::::@::::::@:::@::: @:::@::::::::::@::::::@::::::@:::: 
       0 +----------------------------------------------------------------------->Gi
         0                                                                   16.24
    
    --------------------------------------------------------------------------------
    Command:            ./cpp-version
    Massif arguments:   (none)
    ms_print arguments: massif.out.18391
    --------------------------------------------------------------------------------
    
        KB
    12.15^@                                                                       
         |#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
         |#                                                                      :
       0 +----------------------------------------------------------------------->Gi
         0                                                                   11.17

I can't say I'm impressed here.

In the process of being all self righteous and morally outraged, you have killed the comments contributed by your audience.

It strikes me as odd that I kept coming back to your blog, mainly to see whether my comment #775739854 of ~January 23rd was still pending moderation. That post represented considerable effort and it included remarkable data points highly relevant to your post subject.

I noticed I wasn't really the first person to actively bump his comments in order to get noticed. Also, this was the second time I posted said comment at that very article. Somehow, the first one got mysteriously missing, after having been pending for moderation. So all of this leaves me wondering whether you were just not ready to maintain your blog, including comments.

Here is the gist of the comment (I can't reproduce the version anymore, since you ... destroyed it):

> http://jacquesmattheij.com/when-haskell-is-not-faster-than-c...

===================

Hmm. I might be missing something.

But I too read that article you linked, and decided to whip up something in C++. Here's what I wrote, largely unoptimized: https://gist.github.com/4590998#file-cpp-version-cpp

To my surprise, it was ~40x faster than your C version... (tested with the original test input replicated 2500 times). Here's the timings (makefile included in the gist I linked)

sehe@desktop:/tmp/4590998$ time ./cpp-version < input | md5sum 33ad35318cfcdc0b675f33633b26445b - real 0m2.187s

sehe@desktop:/tmp/4590998$ time ./c-version < input | md5sum 33ad35318cfcdc0b675f33633b26445b - real 1m30.358s

(the md5sum is just there to verify that the results are identical)

===================

What's the password doing on their server?

Also, why is there no salt in the comparison. It calls a naked crypt, that whole ... interesting ... hash() function is sitting there unused.

I have serious doubts whether this code actually serves the user's interest - despite trying to be cute and helpful

Lies We Tell Kids 18 years ago

I agree. In manner of response to the very agitated repliers: I'm not saying that sharing fault is something to be ashamed of.

I'm not also morally condemning my parents for lying to me, keeping me away from nice things and generally failing to teach me everything they should have known.

I'm not going to condemn anyone for trying to make a relationship work and then recognizing it failed. Maybe you failed. Maybe you had poor judgement. Whatever. It failed.

It is partly my fault that me and my wife are still together. I'm proud of that. I'll still be proud of that when she leaves me in 10 years. And I have been sharing the guilt.

I'm not big on the 'you can always see it coming' argument. I think there is always a reason person X wants to break up. And that reason must have something to do with person Y as well, otherwise, why break up?