Thank you treeform. Have a nice weekend.
Hi
In Java binary search returns a negative index if target not found in array
where negative index is where to insert (as positive) to preserve sorted array.
Is upperBound/lowerBound following binary search speeds O(log n) worst case or
linearly?
I'm too stupid to read the source code:
[http
Thanks for your answer. I'm not smart enough to begin implementing stuff like
that.
The guy DannyBee on the hackernews forum claims that GCC easily could do this.
[https://news.ycombinator.com/item?id=17592359](https://news.ycombinator.com/item?id=17592359)
Just thought it was interesting.
Are
I recently stumpled upon this thread on HN:
[https://kukuruku.co/post/automatic-algorithms-optimization-via-fast-matrix-exponentiation](https://kukuruku.co/post/automatic-algorithms-optimization-via-fast-matrix-exponentiation)/
Impressive. Can the same thing be achieved in Nim? I tried to use the
Thank you for the gist. You corrected some of my brainfarts as well.
Clang seems to be faster for me than gcc! Now faster than my cpp
implementation. What configurations sets gcc as standard when compiling Nim?
My results: Clang: 0m0.144s GCC: 0m0.197s
I'm on a MBP 2013 with Core i7 I7-4850HQ.
Hi def You beat me to it!
**Thank you** very much for looking into it and replying. You are right!
I don't get quite the same performance boost as you do, cpp still seems faster
but barely. Might be any number of reasons.
Do you have any more nice tricks for the nim code? Did you also wrap the
Okay. I noticed in another thread
([https://forum.nim-lang.org/t/1268/1#7848](https://forum.nim-lang.org/t/1268/1#7848))
Araq telling to wrap the code in a main proc.
I did and now the speed is almost comparable to my cpp!
Nim: 0m0.197s cpp 0m0.159s
Impressive. I updated the master branch
I have written a differential evolution algorithm in cpp and Nim.
My cpp version is faster (6-8 times) and I was hoping I could get comparable
performance with the Nim implementation. I need a hand.
Nim version:
[https://github.com/peheje/nim_genetic/blob/master/DifferentialEvolution/app.nim
Thanks mratsim!
allel statements, spawn
statements or even "bare" threads. Am I doing something wrong?
I thought that because the object is a ref object only the ref: the address,
would be copied?
Code here:
[https://github.com/peheje/nim_genetic/blob/master/mutable_state.nim](https://github.com/peh
10 matches
Mail list logo