Logo

dev-resources.site

for different kinds of informations.

Common Lisp VS C: a testimony

Published at
7/8/2024
Categories
lisp
commonlisp
c
programming
Author
vindarel
Categories
4 categories in total
lisp
open
commonlisp
open
c
open
programming
open
Author
8 person written this
vindarel
open
Common Lisp VS C: a testimony

I like testimonies. Here's one on Lisp vs C. About execution time, speed of development, length of programs, ease of development.


I find SBCL produces highly performant code, and is even faster with a small number of well-placed type declarations. I have a Lisp vs C story: I'm a mathematician and was doing some research on the Cops and Robbers game in graph theory with a friend of mine who is a computer science professor and has worked in the past as a professional programmer. We needed some data on which graphs have winning strategies for the cops and decided to independently write code to compute them so we could vet the results against each other.

I wrote my code in Common Lisp and ran it with SBCL; he wrote his code in C.

My program was 500 lines and his was 4,000 lines. My program was faster than his and it's no mystery why: I tried several different optimizations my friend also thought of, but didn't implement because it would have been another 1,000 lines or so. I also find my program much more readable than his, just because of the length: even if you are 5 times as fast at reading C than Lisp, his program is still 8 times as long!


by @[email protected] on Mastodon (https://framapiaf.org/@[email protected]/112746475805471440)

and... that's it o/

lisp Article's
30 articles in total
Favicon
Common Lisp HTML templates: using Djula in .lisp files
Favicon
Remaking a rule-engine DSL
Favicon
Advent of Code: alexandria's map-permutations was perfect for day 08. Common Lisp tip.
Favicon
C and C++ are really so fast?
Favicon
Scheming About Clojure
Favicon
FTP and SFTP clients for Common Lisp
Favicon
Common Lisp with batteries included: CIEL v0.2 (aka fast scripting with useful libraries)
Favicon
A shell script that I usually run after installing SBCL
Favicon
Common Lisp VS Haskell
Favicon
Debugging Common Lisp: "Iย feel so much faster and free"
Favicon
Learning Lisp - making sense of xrefs in SLIME
Favicon
Learning Lisp
Favicon
Common Lisp's groupBy is Serapeum:assort
Favicon
Common Lisp VS C: a testimony
Favicon
Lisp: simplifying my problems through code
Favicon
Python VS Common Lisp applied: print, log and icecream
Favicon
Lisp-style list in Rust
Favicon
RainLisp on .NET
Favicon
Is Elixir or Common Lisp the best language for building a bootstrapped B2B SaaS in 2024?
Favicon
Form validation in Common Lisp
Favicon
Common Lisp GUI with Electron ยท quick how to
Favicon
Throttle/debounce a Common Lisp function
Favicon
OOP via FP : functional nature of classes and objects
Favicon
5 ways to get text from an Emacs buffer
Favicon
Configuring Neovim with Fennel
Favicon
Coding in the Shadows: Hidden Gems of Lisp, Clojure, and Friends
Favicon
Emacs is More Like a Terminal Than an Editor
Favicon
Do you need an IDE to write Common Lisp?
Favicon
Entendendo Algoritmos - Cap.5 Quicksort em Clojure
Favicon
The unreasonable effectiveness of working with a live programming image

Featured ones: