488 karma · joined May 3, 2010
That, combined with the cost of the hardware in comparison to a digital copy makes me think this is unlikely to be particularly useful to the games industry. It's incredibly impressive though!
https://blog.mozilla.org/blog/2019/09/03/todays-firefox-bloc...
Perhaps rather than pointing out which cells are wrong, highlight the group/row/column that break the rules instead. That might make it slightly harder.
On the backend, Hacker News runs on one core, and Graham calls this a “remarkable feat of scaling.”
Wow, Really? I'd say that is pretty remarkable, yes. Is there anywhere that goes into more detail about this?Ok, solving this kind of thing is rare, but still...
1) https://github.com/ghc/ghc/blob/master/compiler/stgSyn/StgSy...
Its never been legit for such burglars to gain access to a building and leave a note describing the poor security on the CEO's desk.
Unless, of course, you happen to be Richard Feynman. Which most of us aren't.http://www.silvertrading.net/articles_lagniappe_01_richard_f...
Use enums for your op codes, and a switch statement (depends on compiler). If you use enums and a switch, the compiler can generate a jump table because it knows the enum will always be in a certain range. Much better performance than a bunch of if/else statements.
You can generate some beautifully simple interpreters this way, but switch/dispatch is not the way to go for high performance. Jump tables like that are not a good candidate for optimisation by compilers and they kill any sort of branch prediction your CPU is doing.Here's an post (and follow up discussion) by the author of the Lua, where he explains why the main loop is written in assembler and why it beats compilers:
Each comparison of objects provides one bit of information.
So k comparisons provide k bits of information, or 2^k possibilities.
Therefore to distinguish between n options, we need at least log_2(n) comparisons.
There are n! ways of ordering a list of length n.
log(n!) ~ n * log (n)
So to sort a list of length n, we need at least O(n * log(n)) comparisons.
It certainly requires more maths than just counting 'for loops', but I find the explanation surprisingly elegant.