Rickard Lindberg | Blog | Projects

Written by Rickard Lindberg Profile picture of Rickard. in #c

I couldn't resist programming some C today.

The program that I worked on was a program to print unique lines:

rick@fedora:~/projects/cunique$ cat test.txt
hello
world
hello
there
rick@fedora:~/projects/cunique$ ./cunique <test.txt
hello
world
there

I managed to write it, but I also wanted it to perform well. When I try the above with a 1GB file it seems to take forever, but my Python equivalent finishes in around 5s.

That made me feel discouraged and made me think that I should work more on Computer, Enhance! before I think I have an idea about how to write performant C code.

However, I got to program C and that was fun.

2026-04-04 week 14

What is Rickard working on and thinking about right now?

Every month I write a newsletter about just that. You will get updates about my current projects and thoughts about programming, and also get a chance to hit reply and interact with me. Subscribe to it below.

Powered by Buttondown (My Newsletter)

Profile picture of Rickard.

I'm Rickard Lindberg from Sweden. This is my home on the web. I like programming. I like both the craft of it and also to write software that solves problems. I also like running.

Me elsewhere: GitHub, Mastodon.