Hacker News new | ask | show | jobs
by ffriend 3218 days ago
> The author understands your perspective but he's deliberately using a different one.

In this case the way the author shows it isn't the best one: he modifies Python code to be more realistic - that's ok, but doesn't he do the same thing for Julia? Obviously, writing a recursive fibonacci functions isn't the best way to implement it. Obviously, using caching can improve performance. But why not to apply these changes to both implementations?

1 comments

>he modifies Python code to be more realistic - that's ok, but doesn't he do the same thing for Julia?

Yes, I agree he didn't rewrite the Julia fibonacci examples the same way as Python.

My comment was speaking more to the usage of "optimized C libraries" in his benchmarks as being appropriate for his particular goal. (As response to poster hojijoji's objection to C-implementations.)

And his goal is to compute fib(20) really quickly?
I used "goal" to mean his "overall goal" of showing optimized C libraries instead of pure Python for various scenarios. (My response to poster hojijoji objection to C libraries.) Using C libs is not an invalid benchmark if one understands why the author used them.

Yes, when the author didn't change both Python AND Julia fibonacci examples in exactly the same 1-for-1 manner, it does detract from his overall message because it invites nitpicking. (The nitpicking is reasonable if you're hyperfocused on that fibonacci example.)

Based on your other responses in this thread, you seem to want him to write Python-vs-Julia benchmarks that's suitable for benchmarksgame[1]. You have a valid perspective but that's not the article he claimed to write.

[1] http://benchmarksgame.alioth.debian.org/u64q/python.html

My question is then, why bring up Julia at all? Of course, there will be nitpicking when you put two languages against each other, in a benchmark written for a specific purpose, and then start to modify the implementation for one of the languages. It seems like the goal of the blog post would just as well be achieved by saying "here are some ways of speeding up a function in Python".
>My question is then, why bring up Julia at all?

Because he wasn't writing about Python in a vacuum. In his very first paragraph[1], one can see that the article was a response to Julia's benchmark.

Your question could be reversed for the authors of julialang.org website and they could've restricted themselves to say "here are some ways of writing functions in Julia" -- without bringing up Python at all.

But the Julia folks didn't do that because ... people like to write comparisons to other things!

[1] see 1st paragraph that begins and ends with: "Should we ditch Python and other languages in favor of Julia for technical computing? [...] did the Julia team wrote Python benchmarks the best way for Python?"