3,566 karma · joined May 8, 2013 (13y ago) · 1,534 submissions
comment 4y ago · link · parent
It was hard to find the motivation before but my four legged friend has made all the difference.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Contemporary automobiles are clearly not perfect, but they have evolved over a century to put considerable thought to safety and efficiency. This "concept" throws everything out the window in exchange for ... cars that go sideways.
I'd like to contrast this to Volvo's effort a decade or so ago where they asked the question "Car design is all male focused, but what are the _actual_ issues women care about?" and came out with really useful if mundane ideas (easier/hands-free access, greener material, etc). There are things that can actually be realized and would be helpful.
comment 4y ago · link · parent
Implementing this would require instruction fetch to take an exception on line-crossing instructions (which must be illegal) and a change to the assembler to insert a 16-bit padding nop or expand a compressed instruction to maintain the alignment. There is nothing needed from the compiler (or linker AFAICT). JITs will have to be aware though.
comment 4y ago · link · parent
Interesting to contrast with Arm which upon defining Aarch64 did _away_ with variable length instructions and thus also page crossing ones. Maybe they knew something.
comment 4y ago · link · parent
The simplest possible mitigation would have been to disallow an instruction from spanning a 64-byte boundary. It would have almost no impact on instruction density, but it would have saved a lot of headaches for implementations.
comment 4y ago · link · parent
Variable length ISAs are characterized by not being able to tell the beginning of an instruction without knowing the entrypoint. This applies to RISC-V with compressed instructions. Finding the boundaries is akin to a prefix scan and has a cost roughly linear in the scan length, but IMO the biggest loss is that you can’t begin predecode at I$ fill time.
comment 4y ago · link · parent
Of all the artifacts in our industry, few things live longer than formats. Eg. we are still unpacking tar files (Tape ARchieve), transmitted over IPv4, decoded by machines running x86 processors (and others, sure). All of these formats couldn't possible anticipate the evolution that follow nor predicted the explosive popularity they would have. And all of these (the latter two notably) have overheads that have real material costs. IPv6 fixed all the misaligned fields, but IPv4 is still dominant. Ironically, RISC-V didn't learn from x86 but added variable length instructions making decoding harder to scale than necessary.
I'm not sure what positive lessons you think we should learn from QOI. It's not hard to come up with simple formats. It's much harder coming up with a format that learns from past failures and avoids future pitfalls.
comment 4y ago · link · parent
At the very least, break it into chunks and add an offset directory header. I'm sure one could do something much better, but it's a start.
EDIT: typo
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
I have no problem with people with an attitude. I just don't always agree with them (all of the aforementioned included).
comment 4y ago · link · parent
Beauty is in the eye of the beholder, but as best I remember I always lamented the verbosity of Pascal (I worked professionally for a time in Turbo Pascal). Modulo-2 was IMhO a much better language and had he used that, revised with a more concise syntax a-la C/C#/Rust, I think I would have been a lot happier. (I must resist the urge to go back and reimplement BLS Pascal the way I would have liked it).
Stepping back a bit, what really made Anders' early designs remarkable wasn't just the engineering, but the deliberate trade-off he made. He emphasized compilation time over almost everything (I think all contemporaries tried to generate as good code as possible). This priority is what dictated a one-pass compiler and in assembler. I saw the same unusual economy in his code where sometimes he would do things in a less efficient way, presumably because it saved code size.
comment 4y ago · link · parent
Anders is a bit of a childhood hero of mine.
I got the BLS Pascal 1.2 and the shock of coming from line-based interpreted Microsoft BASIC to full-screen editor with lighting fast compiler in three keypresses (Ctrl-X, C, Return) is hard to describe. (Full-screen editing and compilation representing two quantum leaps).
Studing the internals of the BLS Pascal (Z80, Nascom 2) literally boggled my mind with the genius of the code which was unlike any other Z80 code I had read.
I was fortunate enough to meet the still young Anders at the "Herningmesse" where he was demonstrating Compas Pascal (running a Maze generator to attract eyeballs). He was very nice but I was too shy to ask the really good questions :)
I'm still actually chasing this. I have never managed to get a working version of BLS Pascal 1.3 but I know it exist (help would be most welcome - the one Google find you is corrupted).
comment 5y ago · link · parent
Completely aside, compressed instruction hurt in a completely different way: as specified RISC-V happily allows instructions to be split across two cache lines, which could be from two different pages even. THIS is a royal pain in the ass and rules out certain implementation tricks. Also, the variable length instructions means more stages before you can act on the stream, including for example rename them. However a key point here is that it isn't a per-instruction penalty, it a penalty paid for all instruction if the pipeline support any variable length instructions.
comment 5y ago · link · parent
That's 100% nonsense. They have the same performance and in fact, some pipelines can get better performance because they fetch a fixed number of bytes and with compressed instructions, that means more instructions fetched.
The rest of the argument falls apart resting on this fallacy.