6 ms·
This is an interesting project - kudos for executing it. I have to admit that when I was starting out in this field, I too fantasised about, "Would this softwar
by thisislife2 5mo ago
This is an interesting project - kudos for executing it. I have to admit that when I was starting out in this field, I too fantasised about, "Would this software be faster, smaller and better in assembly?". Ofcourse, assembly programming made some sense in embedded electronics, which can be very resource constrained and even specialised for one particular application. Thinking from that aspect, perhaps you should consider making this a specialised program that runs on something like a Raspberry Pi - running such a web server directly on it, without an OS (or a very minimal OS), would make for a real cool and interesting project.
- senfiaj 5mo agoIMHO, for servers IO (FS/DB, network, etc) is usually a greater bottleneck. Microoptimizations make sense only for CPU bound problems.
- jvanderbot 5mo agoI am pained to think of TLS/HTTPS implemented as a hobby project in ASM, but would be impressed to see it.
- LegionMammal978 5mo agoI did actually make an attempt at that once for BGGP5 [0]. (That is, making a minimal, horribly insecure 'client' implementing just enough behavior to get a response from a server.) But I got demoralized by how much space the binary blobs for the crypto algorithms took up, in comparison to the actual machine code. [0] https://binary.golf/5/ https://binary.golf/5/
- dorianmariecom 5mo agothat url leads to scam
- cevn 5mo agoIf you keep scrolling down there is some kind of contest, I was confused at first as well. It seems to be parodying scam sites.
- grebc 5mo agohttps://2ton.com.au/rwasa/ https://2ton.com.au/rwasa/
- tyingq 5mo agoYou could borrow the output of the perl scripts from openssl. https://github.com/openssl/openssl/blob/master/crypto/aes/asm/aes-armv4.pl https://github.com/openssl/openssl/blob/master/crypto/aes/as...
- golem14 5mo agoI'd really like to see a TCP/IP stack written in native forth (if anyone needs a really good therapist, that sounds like a _great_ project to try ;) I mean, it doesn't look _that_ daunting, but the fact that noone seems to ever have release an open source version (there are rumours of proprietary stacks though) speaks for itself. One of these days ...
- HeliumHydride 5mo agoThis is a web server, but not a full TCP/IP implementation: https://news.ycombinator.com/item?id=19146767 https://news.ycombinator.com/item?id=19146767
- golem14 5mo agoYes, well aware of it, that's actually very nice for building higher levels of the webserver. I'd really like to have a complete forth machine dealing with everything, say on an esp32. I guess there's FreeRTOS, so I could use that network layer, but bare metal would be so much cooler. I admit I don't even understand how it would work - would I have to bit-bang the ethernet lines?
- seba_dos1 5mo agoYou interface with SoC's peripherals rather than bit-bang lines. You can think of them as a kind of memory mapped APIs.
- golem14 5mo agoI never interface with the peripheral in an ESP32 directly. I guess I really need to read the Free-RTOS code. Micropython just uses that, last I checked.
- thisislife2 5mo agoI was thinking more of the memory usage. As another project posted on HN described, they were running the web server in the RAM of an RPi ( https://news.ycombinator.com/item?id=48064312 https://news.ycombinator.com/item?id=48064312 ). Without a full-fledged OS, and a tiny (and fast) webserver coded in Assembly, more RAM would be available for the webserver and they could serve more users.
- hatefulheart 5mo agoWhat on earth are you talking about? Assembly makes sense in desktop computing as well. Have you ever, for example, watched a video? What do you think powers the codecs, JSX?
- xnorswap 5mo agoI'd assume most are written in C or some other higher level language. Certainly I checked the x264 ( VLC implementation of h264 ) and that is C.
- otherjason 5mo agoThe statistics reported by GitLab for the x264 repo (https://code.videolan.org/videolan/x264 https://code.videolan.org/videolan/x264) report that the project is 13.5% assembly; common utilities used in the inner loops of the codec have optimized assembly implementations for several CPU architectures.
- xnorswap 5mo agoI stand corrected.
- jamal-kumar 5mo agoA lot of the encoding side on ffmpeg now uses hand-coded assembly optimizations to take advantage of avx512 instructions on newer x64 processors for "100x speed increase" since February 2025 in a stable form https://www.techspot.com/news/108715-ffmpeg-gets-100x-faster-avx-512-handwritten-assembly.html https://www.techspot.com/news/108715-ffmpeg-gets-100x-faster...
- thisislife2 5mo agoYes, I do know that some Assembly is used in systems programming and other niches where it makes sense. To be clear, I was talking about the phase some of us go through (as amateurs) when we think everything would be "faster, smaller, better" if written in assembly - Python is slow. What about C or Pascal? Wouldn't asm be faster? ... but, as we all realise sooner or later, there's a reason we prefer to code in high-level or very high-level languages, and why pre-mature optimisation can be a real handicap.