
Qhasm: tools to help write high-speed software - sr2
https://cr.yp.to/qhasm.html
======
gwu78
Favorite part is how he mixes the register allocator with a chain of seds.

I did something similar with a youtube downloader I wrote, using a long chain
of seds. It is not as beautiful as Python but it is smaller and faster.

When I shared it with HN the youtube-dl author called it "unmaintainable". By
who? I have had no problems maintaining it. :)

------
inetsee
This looks like it might be interesting, but the most recent date listed is
2006, with little to suggest that anything has been done since then. Does
anyone know if this is nothing more than an historical artifact?

~~~
super-io
What needs to be done?

It still works.

If it anything like his other programs I would expect it will continue to work
for as long as we live.

~~~
yorwba
> _WARNING WARNING WARNING: qhasm is in prototype form. The existing qhasm
> tools and interfaces have produced high-speed professional-quality software
> for several applications, but they are not themselves professional-quality
> tools; they have many known deficiencies and many sharp corners. Each of the
> qhasm tools has at least one complete rewrite planned. The .q language is
> not stable; if you write .q files then you should plan on having to modify
> them extensively for future qhasm releases. The machine-description language
> has a stable structure but is still undergoing tweaks; I can incorporate
> machine descriptions into qhasm and keep them up to date, but I won 't
> promise that non-incorporated descriptions will continue to work. The
> prototypes of qhasm's cycle counter, range analyzer, and scheduler are
> several generations behind the current .q language and, as a practical
> matter, aren't usable right now._

Seems like quite a lot would need to be done, even if it works to some degree.
Have you tried it? (I haven't.)

~~~
super-io
> Not scared? Okay. Here's how to download...

I have had a great user experience with all his other software except one[1].
Thus I was not scared. High learning curve, but high reward.

1\. A FORTH he wrote for IOCCC. Problems compiling probably due to my own
stupidity.

------
wkoszek
Has anyone ever really understood how it happens that code produced with qhasm
is so fast? I understand code unrolling, but DJB mostly gets speed because he
understands the sequence of instructions in an algorithm well. As far as I
remember you had to have a machine architecture spec for this tool. So I
wonder if it's a more optimized register allocator?

