Си

Материал из Xgu.ru

(Перенаправлено с C)
Перейти к: навигация, поиск

[править] А может быть не Си?

Хороший пост на тему:

A few things.

Zero: C CAN be fast, but it is hard to write correctly and efficiently. It
should be used when speed of processing is of the utmost importance. But it is
not always.

One: Sometimes FORTRAN is faster. Pointer aliasing can mess you up.

Two: If you are largely I/O bound, you can write in any language you please.
Shaving a millisecond off each database record process doesn't matter if it
takes a second to get each record or file.

Three: Everything is fast for small N. If you have to process 5 text files,
perl will be way quicker if you account for programming time.

Four: You can be algorithmically bound. A O(n) algorithm in Python is faster
than any O(2^n) algorithm in C.

Five: Security. Something as simple as:

  char* inputSting;
  printf(inputSting);

is a security hole.

Six: Compilers (which probably should be written in C or C++ if only to avoid
bootstrapping problems) have been getting smarter. LLVM will optimize and
compile into machine code any front end language I like.  

Источник: [1] Quora-icon.png

Источник — «http://5.9.243.178/wiki/%D0%A1%D0%B8»