logoalt Hacker News

dh2022today at 4:58 AM2 repliesview on HN

I think the concern was conserving memory ( which was scarce back then) and not iterating through each substring.


Replies

priceisheretoday at 9:04 AM

But does it even conserve memory? Copying a string when you have the length is 2 bytes of machine code on x86 (rep movsb).

Remember, code takes up memory too.

delta_p_delta_xtoday at 5:10 AM

I am very sceptical about that. Much safer and cleaner languages like ML and Lisp were contemporary to C, and were equally developed on memory-scarce hardware.

show 1 reply