Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fastest scripting programming language? [closed]

I have a web application project where performances count more than anything else, and I have the choice of the technologies to use.

The language shootout benchmarks that are not really related to web applications.

What would you recommand as the best suitable candidates?

Thanks!


A friend suggested the gwan server on IRC. Looks to be what I was searching but I never heard about it before. Anybody with prior experience on this package? Ease of use, reliability?

Before I leave Apache, I would like to get your thoughts.

like image 617
Michi Avatar asked Aug 11 '10 14:08

Michi


People also ask

Which is the most powerful scripting language?

Java. Java is one of the most powerful programming languages that is currently used in more than 3 billion devices. Java is currently one of the most trending technology. It is used in desktop applications, mobile applications, web development, Artificial intelligence, cloud applications, and many more.

What is the fastest growing programming language?

Rust: Rust is one of the fastest-growing programming languages as it grew 234% in the past year and its applications will continue to grow in 2022 and beyond. It is a multi-paradigm, general-purpose programming language designed for performance and safety, especially for concurrency.

Is there any closed source programming language?

A language cannot be closed-source. Its compiler and run-time libraries can be closed-source. A formal grammar of a language can be kept as a secret though and be legally protected (NDAs, etc.) and fees collected for usage.

Is C++ faster than rust?

Being the descendant of C and with its code compiled, C++ excels such languages as Python, C#, or any interpreted language. In terms of Rust VS C++, Rust is frequently proclaimed to be faster than C++ due to its unique components.


1 Answers

G-WAN is a neat webserver: it's based around the "C scripts" concept:

A C script is simply C source-code that is compiled by the webserver and then loaded in protected memory. It will get called by the webserver when a request to the servlet is made. The servlet, as it's compiled by a C compiler, is "as fast" as normally compiling a C program. However, the advantage of C scripts to, for instance, CGI or FastCGI, is that the compiled program is in the same memory space as the webserver. This reduces the overhead of communication (either by creating a process, in the case of CGI, for each request, or the socket for FastCGI).

The webserver is using the select/poll technique: non-blocking I/O. However, there's a neat thing to it. Every program can be written as if it was using blocking I/O. As the webserver itself compiles each C script, it can transform the program to use non-blocking I/O. As of this, it can link itself to third-party libraries (like database access) and still make use of the non-blocking I/O nature: no thread/process context switching.

The tools provided for programming the C scripts are, for instance, caching and safe buffers. The next (not yet released as of writing this post) version will also include a Key-Value store.

Performance-wise: there are some benchmarks available showing it's outperforming any other webserver, however I don't trust these. Try writing a small CPU intensive program in C and in, for instance, PHP. Let the C script run on G-WAN and the PHP script on Apache, and do a benchmark yourself.

There is more to it, but that's out of scope for this question.

Some downsides of G-WAN is that it is developed by only one person. There is a forum, however, where you can ask questions.

Ease of use is limited by your skill in C. The API provided, however, is simple. It still has some inconsistencies and (in my opinion) ugly parts, but that's not a problem. A more serious problem is that each version is not guaranteed to be backwards-compatible and you may have to rewrite.

If you want to be safe: make use of C's platform independentness: allow your code to be compiled to (Fast)CGI programs and also to be used by G-WAN. Might G-WAN fail, you can always fallback to Apache's (Fast)CGI (see http://www.fastcgi.com/ for API's).

like image 132
Pindatjuh Avatar answered Sep 23 '22 07:09

Pindatjuh