has anyone measured the relative power consumption of a system which executes a simple VM's code in a relatively straightforward way (and therefore ends up with lots of pipeline stalls, etc) and one which uses a JIT to compile the same code into machine code the second time it's executed, and then run that?

the best i can find from a quick google is a 2006 paper by Shiwen Hu and Lizy K John, which measures the energy impact of JIT optimisation and garbage collection. their most interesting result is that garbage collection reduces power consumption! so does JIT optimisation, which i assume is not entirely accidental; but interestingly they find that the optimisation stage itself also reduces power (presumably over executing unoptimised JITted code), rather than spending to recoup as one might assume

image description of LB: title 'JOURNALISM'.
top panel: title 'BEFORE'. a stick figure running up from the crowd towards someone speaking from a position of power, with a microphone and a question

bottom panel: title 'NOW'. the same stick figure is now facing the crowd and holding only a megaphone, which is amplifying the words of the person in power.

full-text search for two terms using just grep:

grep -Fl 'more common term' \
$(grep -rFl 'rarer term' directory )

or if you don't want to wait for the first one to finish before seeing some results:

grep -rFl 'rarer term' directory \
| xargs grep -Fl 'more common term'

the second one is easier to extend to a lot of search terms:

grep -rFl 'rarest term' directory \
| xargs grep -Fl 'less rare term' \
| xargs grep -Fl 'common term' \
| xargs grep -Fl 'commonest term'

and of course, it's grep, so you can search for regular expressions too... but put them after the static terms in the pipeline, so that they're the last things grepped

someone texted you and you need to reply, and it's going to be a long one - about 1000 characters or so. do you type it all in by phone?

oh no, dragon.style has apparently fallen over in a heap :-( (either that or i missed an announcement...)

re: Removing Kindle DRM + 

@jessmahler also, you need to stop it from auto-updating, which it is (for some strange reason) desperate to do

pride, neurodiversity, conversion therapy, suicide 

Suicide rates and unemployment among autistic folks is a quite big sign too that this society doesn‘t work for us or want us to be us.
Also because neurodiversity and queerness often come together.
Let neurodiversity be a part of your fight.

Show thread

pride, neurodiversity, conversion therapy, suicide 

Why is it important to include neurodiversity in pride?
Well, neurodiverse peeps need visibility & and rights too.
But for example conversion theraphies were not only invented to cure homosexuality but also autism. See Dr Ivar Loovas, he did both. And it continues to be forced upon autistic peeps, especially kids, and is called ABA. In the US and in Europe. #ABAisAbuse

ppl are sharing an Onion report where the cops complain they can't infiltrate leftist groups, cos we're too disorganised and hate one another.

it's funny parody, but not as funny as reality. I'm taking this cue to remind the *actual* reason the FBI can't infiltrate us: They'd have to read too much fucking theory. Also we all live crammed together in the same flat with no cash

(Borum/Tilby, "Anarchist Direct Actions: A Challenge for Law Enforcement". DOI 10.1080/10576100590928106)

@millihertz I wonder what is the cost of atomic increments today compared to back in the day when Intel CPUs would “lock the bus”?

I know atomics disable compiler optimizations because they are treated almost like volatile pointers, but the hardware cost?

📎 Clippy 2000: "It look's like you're writing a letter - would you like help?"

📎 Clippy 2022: "It looks like you wan't to leave the company so I secretly informed the admins to have a closer look at you."


(Via twitter.com/coolharsh55/status)

and especially not in the presence of threads, because all refcount updates have to be atomic. which means that your "lightweight" object lifetime tracker now needs the heavy machinery of synchronisation around it... which means refcount updates are slooooowwwww

(and it also defeats the whole "doesn't require global knowledge" aspect of refcounting. the refcounts themselves end up being global sync points... unless each object is thread-local and refcounts are messages, in which case they're at least visibly slow! but also, proxies only really need to send an increment to the object they're proxying when they're created and a decrement when they're destroyed, and can otherwise maintain their own refcount - but given that this assumes no shared memory at all, which rather defeats the point of threads in the first place, would ARC implement that level of cleverness?)

Show thread

people keep having to learn the "refcounting is slow" lesson:

"it doesn't feel “lightweight” because ARC is not lightweight. People did measurements and Swift is much slower than Rust or C++ for many code patterns because of ARC."

i mean, there are ways to speed up reference counting - the ubiquitous GC Handbook discusses this at length, and more recent developments like RC-Immix hone that - but if you're depending on your compiler to insert bumps & dumps and eschewing a runtime GC because "GC is slow", you're not going to benefit from any of that - and you'll cost yourself 30% performance and unpredictable, unconstrained pauses when big object trees are deleted. you'll also leak all of your cyclic structures.

refcounting has its strengths - it doesn't require global knowledge, it only touches stuff already in the cache, it doesn't slow down when the heap is full, knowing that an object is unique means you can scribble all over it at will - but speed isn't one of them!

Time for the final of my #FunctionalLanguageTournament. I'll try to learn the winner of this poll as my first functional language.

Our finalists are:

Scheme, representing the Lisp Group, with 9 votes.
Elixir, representing the Erlang Group, with 11 votes.
OCaml, representing the ML Group, with 9 votes.
Haskell, representing the Other Group, with 20 votes.

Remember, this is for a first functional language, not the best functional language.

Vote for one or more finalists.

meta, twitter crossposts 

if you really feel the need to crosspost something from the birdsite as a screenshot, could you please at the very least copy the text of the tweet and paste it into the image description?

and if you can't do that, then could you please wait until you are at a client which allows you to?

otherwise you're expecting someone else to do a full transcription for the sake of you doing two keychords.

thank you.

@alcinnz so did the 6800, 8080 and Z80; overlapping the completion of instruction N with the fetch of instruction N+1 was the state of the art at the time.

Show older

On the internet, everyone knows you're a cat — and that's totally okay.