Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kristofferc
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
kristofferc
8y ago
Julia is pretty good at dealing with this now though julia> @btime test1(10^5) 147.427 μs (0 allocations: 0 bytes) 99999.1 julia> @btime test2(10^5) 88.472 μs (0 allocations: 0 bytes) 99999.1 In earli
62.
▲
by
kristofferc
8y ago
Of course with built-in detection that checks that the user has their eyes open.
63.
▲
by
kristofferc
8y ago
The Julia compiler is a little bit different in the sense that it actually compiles ahead of time (it is not a tracing JIT). This takes place just before a method (with known runtime types for the arguments) is executed for the first time.
64.
▲
by
kristofferc
8y ago
I went back to "vanilla" NeoVim solely due to the slowness of the VSCode Vim plugin. Been watching the repo you linked a couple of times a month and always disheartened that nothing seems to happen.
65.
▲
by
kristofferc
8y ago
The concrete routine that is dispatched to is based on the type of the input number. So `sqrt(2.0)` will, in the end, call the assembly-instruction (depending on your specific CPU) `vsqrtss` since the input type is a 64-bit float, `sqrt(Flo
66.
▲
by
kristofferc
8y ago
If you need higher precision you could always either simply bump up the accuracy a bit using e.g. https://github.com/JuliaMath/DoubleDouble.jl or you can use the arbitrary precision numbers in Julia ( https://
67.
▲
by
kristofferc
8y ago
A nice thing with using a compiled language (like Julia) is that you typically do not need to worry about these type of things. Using the identical code in the blog post in Julia (with some trivial syntactic modifications, https:/
68.
▲
by
kristofferc
8y ago
The first snippet also doesn't balance the parenthesis s += 100. * x[i + 1] - x[i] ** 2.) ** 2. + (1 - x[i]) ** 2
69.
▲
by
kristofferc
9y ago
Chrome on macOS. Write something in text field and deselect it.
70.
▲
by
kristofferc
9y ago
Small bug with the text field: https://imgur.com/N7SVdMp
71.
▲
by
kristofferc
9y ago
There have been over 25 000 commits since that post was written, clearly, any comments about the specifics of the language are terribly out of date. For example, the base language now has 92% test coverage. CI is being run on Windows 32
72.
▲
by
kristofferc
9y ago
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 lan
73.
▲
by
kristofferc
9y ago
And his goal is to compute fib(20) really quickly?
74.
▲
by
kristofferc
9y ago
How could it possibly take on the order of 1ms to operate on arrays of size 1e9?
75.
▲
by
kristofferc
9y ago
People might want to use recursion. They might want to split out their code into small functions without having to think about the overhead of function calls. They might want to just write a for loop instead of transforming it to vectorized
76.
▲
by
kristofferc
9y ago
You are not restricted to recursion, loops, functions etc, but these language constructs might be useful in situations, and therefore the performance (overhead) of these constructs is interesting.
77.
▲
by
kristofferc
9y ago
For those who only care about the output of fib(20) there are more efficient methods than any of the Julia or Python implementations posted in the link, e.g. lookup tables. The assumption in benchmarks is of course that the results carry ov
78.
▲
by
kristofferc
9y ago
Isn't adding things like memoization or writing the code in C (Cython) missing the whole point of the benchmark, which is to test the overhead of recursion / function calls in the language itself?
79.
▲
by
kristofferc
9y ago
Yes, much better, thank you! Perhaps the menu to the left could get the same treatment? :)
80.
▲
by
kristofferc
9y ago
FWIW, I'm having extreme troubles reading the docs at http://moonjs.ga/docs/overview.html . The text is almost the same as the background for me.
81.
▲
by
kristofferc
9y ago
I think showing them as bars with different heights is more illustrative, like: https://www.toptal.com/developers/sorting-algorithms . Similar colors are hard to distinguish.
82.
▲
by
kristofferc
10y ago
Julia uses LLVM to do code-gen so whatever optimizations are available in LLVM are available to Julia. If the auto-vectorizer in LLVM is not kicking in, it is possible to write explicit SIMD with the https://github.com/eschn
83.
▲
by
kristofferc
10y ago
This is exactly what we do with our cat. We just refill the bowl when it starts to get empty. I would say his weight is average to slightly below average. We have done this since he was a kitten so perhaps that's why it works quite wel