Sunday, 3 October 2010

TIOBE index decomposed

This post presents a different way to look at the TIOBE index. Of the top 20 languages, I exclude non-generic languages, like SQL or MATLAB. The next is to group the languages by performance characteristics:

Compiled languages that produce very fast apps:
* Ada
* C
* C++
* Delphi, Pascal
* Objective-C

Garbage-producing languages:
* C#/
* Google Go
* Java

Languages that produce slow apps:
* Javascript
* Lisp
* Perl
* Python
* Ruby

When I look at products, which I consider successful, fast and slick, I see:
* Apple uses Objective-C
* Linux kernel and tools (incl. Android, Google servers etc.) use C/C++
* Webkit, Google Chrome use C/C++
* Microsoft uses C/C++
* Several successful vendors with great software in my industry use Delphi

I see problems with:
* Microsoft .net and Java apps tend to be bloated and slow
* Java apps on Android are not as slick as Objective-C apps on iPhone
* C#/ programming requires that you are willing to bet your investment on Microsoft, who has lost major market share in many form factors
* Large apps or frameworks built on PHP or similar, simply fail to deliver

Looking into the future, where we will need one language to write one app that runs on multiple CPUs with each their own RAM, or NUMA, the compiled languages will do just fine, but the garbage languages need to be replaced with something that handles memory allocations differently.


ahmoy said...

Objective-C also has a garbage collector (not for iOS though)

LDS said...

"Large apps or frameworks built on PHP or similar, simply fail to deliver"

Facebook? Wikipedia? Flickr?

Also you're looking at Java from a desktop app perspective. Java today is much more used on the server side, like nost of C# code.

Lars D said...

I would not include wikipedia and flickr as programming frameworks, but I agree that a lot of slow technology can be made faster by adding more hardware on the server. However, for languages like php, it is obvious that they don't deliver as general purpose languages - much performance-requiring stuff has to be implemented as php modules using c/c++, and the oop part seriously slows down everything.

AplíkmUj said...

Lars intersting - I don't think this TIBOE Index is worth a lot.

One thing I have observed is more or less nothing really changes ...

IT moves in spirals ... every decade the same ... I bet in 2016/17 the next >>SOA<< (in the 90s it was called workflow and groupware) thing will come, then Java will go up again ... .net there would require that MS would move the Sharepoint into direction of Integration architecture - this will not happen.

.net replaces VB for enteprise apps.

Nothing changes ...

Applications live 10 to 12 years
Virtual machines, GC and virtualization come the moment ressources become low. Currently the bottleneck is more the network, the harddisks in Enterprise are fast enough.

I am not certain - when I look the AMTEL processors and displays do and do in the processor it can really be that managed code can run their and the virutal runtime talkes to the processor and back.

Delphi and TIBOE ... a language that is somehow double LISP is defintily not existing in pracice ... but it still is alive.

Also PL/SQL I don't believe and ABAP too ... 200.000 customers have SAP assuming 1 inhouse administrator/developer on an average, assuming one consultant programmer on average per customer - this is three times or at least same number as Delphi developers ... TIBOE is something that is funny but...

This is a developer index, but there are lot more maintenance people...

The trend for one language itself is interesting ...

On thing is true ... you mentioned it ... virtual runtimes allocate memory fast but at the price of reduced garbage collection. also in the just normal INTEL PC world ... .net on the serverside without limiting memory usage and forcing collection. In pracitce Java to perfrom requires native compilation if this does not work things like document creation ... have fun ... core up to 100%, no GC, out of memory - only chance is to limit the heap for one virutal machine. (Friday - general hospital of Linz - test run PDF document creation...)

Michael Justin said...

JavaScript in modern browsers can be very fast. For example, "The Mozilla platform, which underlies Thunderbird, Firefox and some other web browsers, uses JavaScript to implement the graphical user interface (GUI) of its various products." -

AplíkmUj said...

@Michael - not to forget the Jaxer ... Javascript only.

Popa Adrian Marius said...

I found the same with debian generic test but also with my programming experience
We are served with slow and bloated languages (burger king) like
C#,,java and we are somehow forced by companies stupid rules to work on thouse but in fact if you want fast things you need to code in c++, and pascal on the server side (some might say the real

programmers do hex or asm :P)
heck i can run >10 instances of quake engine written in c in the native form implementation in the same time in the browser
so native code rulz for speed and low memory usage (see the pascal low memory footprint compared with java)

so why the heck we are still continue eating burgers ? it's time for a low carb diet , we want real food with good taste and in classy
restaurant with good history
not the fake food and fatness on our bottoms

Unknown said...

-"it's time for a low carb diet , we want real food with good taste and in classy restaurant with good history not the fake food and fatness on our bottoms."

My hopes for this to happen are on D language, I really hope it goes mainstream.

LDS said...

Wikipedia is run on MediaWiki which IMHO is a framework. There are some big site using Drupal (i.e. The Economist). Just saying "oh, but they have a lot of hardware" is too simple :) Anyway that could show how much scalabe it is!
Even Delphi uses some ASM and C/C++ code, it cannot compile Windows drivers, thus it is not a general purpose language? And I believe noone thinks about PHP as a "general purpose language".
PHP approach IMHO is correct - use the "scripting language" where it is most useful, and use native compiled code for processing-intensive tasks.

Lars D said...

A good example where php fails, is to calculate statistics. If it gets just a little complicated, all oop mudt be stripped, and if it gets worse, it is just too slow. This is business logic, and not some kind of technicality.

Lars D said...

I see absolutely no reason why we need separate languages for different purposes. C# is close to be suitable for everything, it just needs to get rid of the runtime, the memory management and the Microsoft dependency. And yes, you can make drivers for Linux with Kylix :-) (bash can do that, too)

AplíkmUj said...

Lars ... C# everywhere ... this was C ...

Agree a reduced number of languages/technologies for achieving the same is luxury.

The more you move away from the Algol path the more you exclude just normal people from development - this is what I would not want.

Languages which need no IDE ... C# you cannot simply write ... because of class libraries ...

It is still a matter of people and development technologies. SAP(ABAP and 4GL and you develop without IDE on the client side, can run transaction with the rights of the user ... this is more a systematic approach....

Lars D said...

Mike, interesting point about "languages that need an IDE". I agree that requiring an IDE reduces the number of people who can use a language, but it also reduces the productivity of those that use the language. I use readability without an IDE as one of the most important source code metrics.

I would not blame the concept of Class libraries, because a class is basically just a collection of code pieces that take the same data as parameter, which is a good concept. Instead, I would blame those people that do not employ usability techniques when designing libraries and languages. The Java way of converting a string to a double is a good example of a usability disaster.

AplíkmUj said...

Numbers in Java are strange ... this is true, this is weak.

Class libraries are here for reuse ... and you are right they have to be designed for this.

Java in the early days especially Eclipse solved one specific issue - browing class libraries. ICLU was unusable with 9k classes (outside the scope of help files).

If all breaks it must be possible to correct the source code in an editor and a compilation at the commandline must be possible. This is vital for a customer ... this is why scriping is still attractive, call it bash, PHP, Ruby (somehow), Python ... this is reproducable by an administrator...

C# on mono is nothing bad ... a lot more handy than Java ...

LDS said...

Coding a web app requires at least:
1) Server side language
3) CSS
4) Javascript
5) XML
6) SQL
You can also add Flash and the like, plus the graphics skills because you have no standard GUI.
What's the problem with PHP and C? :D
You can also have issue with Delphi alone, if the defunct Kylix can make Linux driver is totally useless, the problem is Delphi can't produce some Windows executables, and you may need to use C/C++ or assembler as well - how FastMM and the FastCode routines are coded?
You describe a C# that can't exist. Yes, C# would be a great language if it wasn't C#...

Lars D said...

Most teams try to consolidate on fewer languages, and it seems that there is currently a movement towards more advanced client-side technology, than HTML+Javascript. Mobile phones are leading the way because Microsoft stopped innovating their Windows platform - Windows still lacks sandboxing and a market.

C/C++ seems to be useful everywhere - even in HTML pages using Google Native Client. There is no reason why Pascal or other language should not be able to do the same.

AplíkmUj said...

>>You describe a C# that can't exist. Yes, C# would be a great language if it wasn't C#...

Web development/development is about combining best of breed.

I have more the feeling that in the future on stream parsing will be a lot more requried ... this will have a deep impact on how data will be devlivered to a certain layer and you only get one chance to decide.

Ciprian Khlud said...

Your categories are at best subjective.
Python generates (enough) fast applications where it is used: installers, menu editors in Linux world. I use Mercurial day by day and I never sow it as a slow application.
PHP is provided already in a framework: FaceBook, Wordpress (as your blog is based on it).
At the end: why so much bias against C#/Java? Do VM destroy your impression of performance? Even so, does the performance of VMs should necessarily make your applications slow?
Fast applications I know to date: most of banking, some of air traffic backbone code are today written in Java. They do have close to real-time requirements. You may argue that they need to be "warmed" to get to that speed, but they are fast. Even for client are fast applications, the most known cases are IDEs like: Eclipse (judge its speed on opening big projectcs), IDEA, SharpDevelop. Google development to make you us to use GMail, Calendar, uses a Java based framework (GWT) which is fast combined with todays JIT based JS browsers. Also, well written WPF applications are fast, accelerated, and so on. Froyo on Android is also fast.
At the end, look on JavaScript: is slow for "native" standards, but is really fast enough for an enterprise based application, for an Office like application, and so on.
I can compare a Delphi application: DevC++ that is really slow (on average to big projects, more than 100 classes) than both Eclipse (Java), MonoDevelop. Lazarus starts slower than MonoDevelop and SharpDevelop (on Windows) on my machine.
Do I draw conclusions? Yes: performance of the latter is by design, not by runtime.