Differences in the performance of Console write operations in windows and linux
Source: Internet
Author: User
Differences in the performance of Console write operations in windows and linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. During the project, many logs are printed on the console for debugging convenience. Each time you perform an operation, many logs are output, causing the program to look very slow. Is it so slow to print information to the console? I suddenly thought that linux was not so slow, so I did a simple test. The test procedure is very simple. It is to use System. out. println () to write a string to the console and write it 100,000 times. I tested it 10 times in my windows xp and ubuntu 8.04 respectively, and found that it took an average of 9.8 seconds in linux, and 18.6 seconds in windows, which is almost twice that of linux. Sun's 1.6 virtual machines were used on both sides, but we did not expect such a big difference.
Is java faster on linux than on windows? I want to find some more comprehensive and authoritative tests, but I cannot find them. On sun's official forum, some people said that the performance on the two systems was similar, and they did not know where he got the conclusion. Through this simple test, we can at least see that on the x86 platform, the same as the sun 1.6 virtual machine, when writing to the console, on windows xp, it is twice slower than that of ipvut 8.04.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.