News for hackers. Stuff that matters.
Re:Web server for Linux written in amd64 assembly by Tepix on Monday February 03, 2014 @09:19AM (#7170696)
I'm surprised that asmhttpd doesn't use sendfile(2) anywhere. Isn't that the fastest way to send a file to a socket?
Re:Web server for Linux written in amd64 assembly by nemasu on Monday February 03, 2014 @10:26AM (#7171046)
Yeah, I'll be switching over to sendfile and getting rid of the large read/write buffers. So much cleaner and simpler ( and faster? ).
Re:Web server for Linux written in amd64 assembly by colanderman on Monday February 03, 2014 @01:28PM (#7172513)
and faster?

You'll get way more bang for your buck by minimizing userspace→kernel round trips and memory copies than by hand-optimizing assembler code. sendfile is one great way to do this.

You'll get even more bang for your buck by eliminating the kernel from the packet processing path by using netmap, PF_RING/DNA, or DPDK, and a user-space TCP/IP stack.

Assembly only really helps alleviate GCC's moronic decisions resulting in excessive stack spills and alignment-unaware loads & stores.

Something about carts and horses.

Re:Web server for Linux written in amd64 assembly by nemasu on Monday February 03, 2014 @08:55PM (#7174996)
Done ... so pretty now. :)