If C is so strong a programming language why can’t it replace Python in AI and data science?

Mohamed Talhaoui
2 min readMar 7, 2024

Photo by Pankaj Patel on Unsplash

My (former*) employer is a facial recognition company with our core technology written in C styled C++, meaning we use classes and STL, but the code is basically C. Our machine learning group also does all it’s work and training in C/C++.

The result is an extremely fast product, with a very small footprint. Granted, the memory handling requires extra, significant effort, but the result is a single integrated application with a web server, a database, the facial recognition core, and a modern UI. This is in contrast to the “traditional” machine learning application that is hosted inside a “server stack”, requires multiple servers and hardware instances to operate, and is accessed through an external UI such as a web browser.

We can put our single application on an Intel Compute Stick (those look like a big USB drive) and it runs perfectly fine, requiring no other software.

It takes effort, and old school C programmers, but it can be done. The result of the extra effort is a product which those working with a traditional server stack simply cannot out perform. We can process 25 million faces per second per CPU core, a level exponentially higher than anyone working in a higher level language can achieve. Combine that with servers having 32+ cores, and that is a hell of a lot more facial compares per second than can be achieved with the limited number of GPUs one can have on as single server.

I left the position end of April, ’21 after working there 7 years

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Mohamed Talhaoui
Mohamed Talhaoui

Written by Mohamed Talhaoui

I’m CS Student 👨🏻‍💻

No responses yet

Write a response