

Tracing JITs and Modern CPUs: Part 2 - lmh
https://github.com/lukego/blog/issues/6

======
LForLambda
Is it a thing to blog with github issues now?

~~~
Everlag
In theory blogging on github issues could actually be quite convenient.

\- Great(==standardized) markdown support.

\- Easy image support.

\- Uptime is someone else's problem.

\- Sending someone your blog also directly links them to your ~entire public
codebase.

\- Builtin sane commenting system.

\- Can keep code beside the blog. Its aggravating to find a living blog that
links to a dead code host.

\- Free with zero setup cost for everything above.

\- Not having to deal with ruby dependencies for jekyll...

Edit: You know, I think I'm going to host my blog in this manner. When writing
the above list I realized I'm sick of having to handle each of those.

~~~
golergka
All of that works with hosting md files in github repo or in gists, but with
them you also get a convenient version control system also known as git.

~~~
jud_white
Even the wiki is a git repo, though there's no built in search like there is
for repositories and issues.

------
fche
(Seems like an "embarrassingly serial" problem -- a smarter lua could turn it
into a single "set c = 1e9" instruction.)

~~~
vidarh
It could, but then we're getting into hairy language definition issues: Does
Lua specify at what point updates need to hit memory? And this example is
perfect example of why a language ought to be explicit about such guarantees -
in this case such a change would have observable effects. Changing observable
effects in optimizations is dangerous territory even when it's well defined.

~~~
Dylan16807
What's memory?

Lua's much more high level than that, and it makes no promises about timing at
all.

~~~
josefx
That has nothing to do with high level, C++ for example also had no built-in
guarantees for a long time. Making no promises about timing simply means that
threading is either a non concept in the language (see C++ before 11) or the
language declares everything to do with threading unspecified or undefined.

~~~
Dylan16807
C++ has volatile.

------
kendalharland
Forgive my ignorance, but when writing a sufficiently large program, why would
looking into the generated assembly be of use to a programmer? Wouldn't this
turn into an arbitrarily large amount of instructions to sift through just to
measure performance?

~~~
tekacs
You find the 'hottest' code (usually a loop, the code executed most) and
examine very carefully the generated assembly for that and how it can be made
more CPU/JIT/VM-friendly.

This is an optimisation you perform when a small amount of code is consuming
the overwhelming majority of your software's execution time (code very
commonly has this property, until it is profiled and optimised).

In addition, this case is for a high speed networking library, where every CPU
cycle counts.

