Language tests for web programming?

I think that as more and more programmers move to the internet with similar and varied tools and techniques, does anyone have a good set of tests for a programming language?

I think server side languages ​​like Java, PHP, ASP.net and C # are great. While it might be something like C or perl, I don't want to go there because it's not basic or even fast.

When I buy a new processor, I can compare floating point, integer and multiple tasks. I can scan things like render times.

I would have thought that someone could develop a standard bench for simple programming tasks and practical web services scripts. Preferably an independent organization. Of course, you can always tweak your code for performance, but I'm saying simple things that can be done the same way in every language. I bet it can be durable.

At some point for scalability, performance will be an issue for web languages. I would like to be able to say that any language, or better yet the latest release, is flocking against the competition.

Does anyone do this, or should I come up with my own business?

EDIT: yes, I know the tests are subjective, even more so for web pages. I didn't say it would be easy or even necessary now. Obviously benchmarking my graphics card in Crysis versus Far Cry is subjective, but it's a useful test in the real world. This is what I am aiming for and for the main languages. Could we see a resurgence in C if performance becomes a focal point along the way?

+2


source to share


5 answers


There are some benchmarks out there comparing many server-side languages .

I've always used fractals, and I was curious if scripting languages ​​were appropriate for the task. I wrote a very simple Mandelbrot set generator for my test. Rather than optimizing for each language, I tried to write each program roughly the same in each language to make a reasonable performance comparison.

Below are the results of my 867MHz Powerbook G4. In short, better. Please note that the following benchmarks are not scientific and were simply performed to satisfy my curiosity. Your mileage may vary.

Feel free to send me ports to any other languages. The program should print the elapsed time in seconds at the bottom in the form "Elapsed% 0.2f". If you can, provide instructions for building on MacOS X.



Language                Time    Relative Speed
C gcc-4.0.1             0.05 seconds     1.00 x
ocaml compiled 3.09.2   0.05 seconds     1.00 x
SBCL 1.0.2              0.13 seconds     2.55 x
Java 1.4.2              0.40 seconds     8.00 x
Io 20070410 Vector      1.40 seconds     28.09 x
Lua 5.1                 1.50 seconds     30.00 x
ocaml bytecode 3.09.2   3.76 seconds     75.15 x
Python 2.5.1            9.99 seconds     199.80 x
Ghostscript 8.51        11.66 seconds     233.12 x
Perl 5.8.6 Optimized    12.37 seconds     247.34 x
TCL 8.4 Optimized       16.00 seconds     320.00 x
Perl 5.8.6              21.75 seconds     435.00 x
PHP 5.1.4               23.12 seconds     462.40 x
Javascript SpiderMonkey v1.6 31.06 seconds     621.27 x
Ruby 1.8.4              34.31 seconds     686.18 x
Emacs Lisp              47.25 seconds     945.00 x
Applescript             71.75 seconds     1435.00 x
Io 20070410             85.26 seconds     1705.13 x

      

+2


source


Here you are talking about underlying technologies that are too general for a specification. The Internet is more about networking and telecommunications than programming languages. Signal transmission, modulation and reception affect the quality of service. Consider multiplayer games or your back office business portal. The main considerations for application performance might be weather, signal noise, distance, number of people using a resource, and so on. Server characteristics and user peripherals will play an important role in the usability of your program. Finally, your program will work fine across different platforms. Therefore, the biggest problem for programmers is not the language, but errors. You don't have buggy programs. This is not a compiler. This is the code.

I had the same question. JavaScript or net point. The answer depends on what you want to do. Probably a pageview, simplicity of data, or a simple operation, perhaps a script, because the script has a simple language structure. Complex operations or a larger data store will get better performance from a more robust and structured programming language like C ++.



There is also a monetary factor that is positively correlated with sophistication in media presentation. All! worth the money, even your time. It may be unclear, but the cost is there. Shared (open source) isn't always better because the hidden costs spring up when you want to use other people's resources. Often, $$ company $$ uses better tools to manage the resources they own, and the tools may require a specific language or technology. That is, you don't always have a choice of language. This decision has already been made when developing resources.

+1


source


Do you mean computational speed or programming performance? Or something else?

Besides the actual speed of the crystal number, the quality of the language is very subjective, and there are those who would argue that programming performance is more important than computation speed.

In addition, while many languages ​​have common characteristics, each language has specific goals. It would be like comparing apples to oranges.

0


source


Floating point metrics, etc. from cpu is less subjective than webpage / webservice etc. to make an honest comparison between languages ​​will be difficult and often the problem is in the way it is written, not in the language itself. It is difficult to accurately compare languages, although it is not possible.

The simplest analogy for me is the TPC database engines are well known and provide performance metrics on the database side, but when does the average developer even look at them? Unless you are running at extreme levels, they are not your determining factor (and even then there are optimizer shortcuts in the DB to improve TPC performance.)

TPC has done a non-profit business outside of it, but it requires significant purchases from competing products - if MS / Oracle / IBM and hardware vendors hadn't bought into it, it wouldn't have gotten very far.

Can this be done? maybe never say never, but that wouldn't be trivial at all and would require buying from different language vendors, h / w vendors, etc. This is more about sales and marketing than technology at this point.

0


source


Has anyone come up with a good test suite for a programming language?

Probably not, and it seems less and less likely - see "Disadvantages of Benchmarks" and in particular "Tests are a cry".

I say simple things that can be done the same in every language.

Why do you think you can say that they are "done the same in every language"? The source code of the program may look the same, but this does not mean that the language translators or processor instructions are generated by the compilers.

-2


source







All Articles