The FreeDOS Project on Nostr: I sometimes write articles to help folks learn programming. And my sample programs in ...
I sometimes write articles to help folks learn programming. And my sample programs in those articles are as simple as possible, so you can see what's going on.
But performance matters too. Here are 3 ways to read text files in C, and how well they run.
https://www.both.org/?p=5327TL/DR: fgetc+fputc is easy for beginners to understand, but super slow. fread+fwrite is way faster, even with a small buffer.
Published at
2024-05-17 09:47:28Event JSON
{
"id": "9605c1b1b6e46153325859837872e255aac224215178cdd5d54820277a748e93",
"pubkey": "1ea74f7f71ca27c1d7cb5293913ce178c1c592e6280b9fec08a59c86db0328c7",
"created_at": 1715939248,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/freedosproject/statuses/112455794616345901",
"activitypub"
]
],
"content": "I sometimes write articles to help folks learn programming. And my sample programs in those articles are as simple as possible, so you can see what's going on.\n\nBut performance matters too. Here are 3 ways to read text files in C, and how well they run.\n\nhttps://www.both.org/?p=5327\n\nTL/DR: fgetc+fputc is easy for beginners to understand, but super slow. fread+fwrite is way faster, even with a small buffer.",
"sig": "5b4d9a8fa94541ab2d7ece479e890ed43a863afa7f40da833c1cc5f14e66e7829ecd1f5910e07d3bd080f2a87f565211be97333f640e0ca5e989e2ab61a9b318"
}