I've not been posting on Slashdot much this week, because I've been trying out Soylent News, which is using (and old version of) Slashcode (with some improvements) and lacks corporate overlords. It seems to have captured most of what I like about discussions in Slashdot, although is suffering slightly from not having nearly as many active users (50 or so comments is still the norm and it probably needs 100+ to be sustainable).
If you've not visited ye
I should try it again. I found it frustrating on my 400MHz machine that gameplay became really slow when the map became complex (2-3 minutes for all of the AI turns to run really breaks immersion), but on a modern machine it's probably quite a lot faster.
Actually, thinking about how long I spent playing it, maybe I shouldn't...
With JavaScript, in most cases, the thing that users care the most about is load time. It's often better to use a simple AST interpreter for JavaScript than a clever compiler, because you can start executing the interpreter as soon as you've got the text. If you spend more than a few ms getting the JS ready to run, users notice even if the resulting code is faster.
The 'often' is the important bit here, because some pages use JavaScript extensively for animations, games, and so on. In this case, users will notice if it's slow. They'll also notice if it's eating all of the CPU on their mobile device and flattening the battery. It's better in this case to switch to an optimised compiled representation as soon as possible, because you can get away with running the game slowly for a few second (while it's typically loading assets and displaying splash screens anyway), but after that people notice.
In both cases, after a while you've got some useful profiling data and so you want to recompile and generate more optimised code (unless it's just doing menu animations and the JavaScript is using 1% of your CPU, in which case the compiler is likely to consume more CPU time than the compiled code will save). Ideally, you want to do this in the background, on another core (or, at least, on a lower-priority thread on the same core), because otherwise you're interrupting the thing that the user cares about to run the compiler.
[1] 'Interpreted' in V8 really means compiled with no optimisations.
Apple has 7.68% of the desktop market and 15.42% of the mobile market. They can pull a lot of stuff without getting into trouble because they don't have anything like the market share required to exert undue influence on the market. When they have larger shares, for example in the online music distribution market a few years ago, they do get investigated.
Your comment makes as much sense as complaining that your corner shop doesn't get into trouble for doing things that would be the target of antitrust investigations if Walmart did them. Apple is a highly profitable niche player, but still a niche player. They can't use their dominant position in one market to gain prominence in another because they don't have a dominant position in any market and haven't since the iPod.
You knew the job was dangerous when you took it, Fred. -- Superchicken