Hacker News new | ask | show | jobs
by devingoldfish 3912 days ago
From the article: "New high-end cars are among the most sophisticated machines on the planet, containing 100 million or more lines of code."

Does anyone know where this number comes from and if its realistic? It's hard for me to imagine unless you're counting all the LOC from Microsoft Windows: Car Edition or something.

3 comments

Can't answer where they came up with that number but it does seem rather larger. The only comparable machine where we do know the number is the Mars Curiosity Rover running somewhere around 2.5 Million LoC. Now, given that there are upwards of 200 micro controllers in a luxury car, I can see that number growing exponentially, but 100 Million???
2.5 MLoC sounds extremely high even for a Mars Rover. I really wonder how it's counted? Is it C code or ASM instructions? Does it include all standard libraries that get referenced, even if they end up not being compiled into the final binary? Or is everything just written in Java and configured with XML?
> 2.5 MLoC sounds extremely high even for a Mars Rover... Or is everything just written in Java and configured with XML?

Highly doubtful, Opportunity is at 4,000+ days of uptime...

Embedded Windows in the UI (if present) would probably account for a large fraction of those.
Yes, that has always been my assumption -- they're probably counting operating system, libraries, etc. in those mlocs. It's X MLOCs in the car, not X MLOCs written by the car manufacturer.
We're not just talking about one computer here -- it's not unusual for a modern car to have ~70 ECUs. Of course, many of those will be quite small, simple devices.
I heard the same number quoted in an NPR story over the weekend and had the same reaction. I really can't imagine how they are getting to that number.