Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Higher level languages with C functions

Tags:

performance

c

Maybe this has been asked before, but I couldn't find it. My question is simple: Does it make sense to write an application in higher level languages (Java, C#, Python) and time/performance-critical functions in C? Or at this point unless you do very low level OS/game/sensor programming it is all the same to have a full, say, Java application?

like image 768
Dervin Thunk Avatar asked Jul 06 '10 21:07

Dervin Thunk


People also ask

What is high-level language in C?

A high-level language (HLL) is a programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages.

What languages have higher order functions?

Many languages including- Javascript, Go, Haskell, Python, C++, C# etc, supports Higher Order Function.It is a great tool when it comes to functional programming.

Is C high-level programming?

Examples of high level languages are C, C++, Java, Python, etc. 1. It is programmer friendly language. It is a machine friendly language.

Does C support higher order functions?

Although C is not the language that supports many FP concepts out of the box, higher-order functions can be implemented using function pointers and also with compiler support.


1 Answers

It makes sense if you a) notice a performance issue, AND b) use performance measurements to locate where the problem occurs, AND c) can't achieve the desired performance by modifying the existing code.

If any of these items don't apply, then it's probably premature optimization.

like image 102
Cogwheel Avatar answered Oct 13 '22 22:10

Cogwheel