Hacker Newsnew | past | comments | ask | show | jobs | submit | DmitryOlshansky's commentslogin

The bonus is synchonizing at arbitrary point in stream and that ASCII is UTF-8

I think one area where spinlock could be useful is fibers. There you have an option to schedule another fiber instead of spinning CPU until timeslice runs out.

I’ve replaced Asio recently with stright epoll event loop and got about 16% RPS better. That is for resonably sized SQL server, so be careful with nice precanned libraries.


I would argue that _premature_ abstraction is worse than _some_ duplication of code.

Also I’ve seen the kind of codebase that seems to be LZW packed due to the sheer desire to DRY everything out. Not pleasant thing, by the time you goto 10 layers deep on some “helper” function you forgot why you in there.


There is a big difference between JIT compiled _dynamic_ language and ahead of time compiled static language. While modern JS engines show that difference sometimes can be narrowed down with sophisticated JIT and runtime, it is still there.


Ruby's YJIT compiler does compile ahead of time, the details are in the link provided. On the first run it will, if feasible, compile blocks of frequently executed code and stow it away for when it's needed next. So only on the first run is it interpreting everything.


Many interpreted languages have this feature, including PHP these days. But they're still quite slow, because dynamic languages are just slow. Dynamic typing is very suboptimal because generally you have to box A LOT of stuff and burn a lot of memory. That matters because then cache lines get evicted more often, and the performance grinds to a halt.

It used to be in PHP that every array element took 96 bytes (!!!) of booking overhead. That was/is why PHP is slow. That was reduced and performance basically quadrupled for PHP 7.4.

EDIT: sorry just wanted to add I'm being a bit hyperbolic. These languages are fast enough for their use cases, both PHP and Ruby. But compared to even something like C#, this is where the performance gap comes from, despite both being garbage collected.


Running NFA is O(nm) not NP.


Sorry, you're right. Capturing worst case was much more expensive, I believe, but I'm no longer sure.


So it is NP (in fact P)


On a related note getting my share of data back from OneDrive was a painful exercise - tons of spurious write errors I spent best part of my evening getting everything back to my filesystem. Yes remote by default was enabled without my consent.


I just wonder if it has the three laws builtin.


I just hope they didn't install the evil red eyes at the factory. I often wonder why they do that with robots in films - it's just asking for trouble.


And I’ve just implemented BWT and Inverse BWT in D, earlier today! https://github.com/DmitryOlshansky/compd/blob/master/source/...


I guess this will be killed soon enough, like so many Google projects.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: