Reputation:
I created an application ( Creating up to 1,00,000 files in a folder ) with 2 different languages ( C#.Net & JAva ) with file concepts and its best methods.
The Application that I created with .NET takes just 3 seconds to create all the files. At the same time, with Java, it takes 15 seconds.
Why is it so ?
Upvotes: 0
Views: 445
Reputation: 5650
Perhaps the reason lies in the fact that Java is designed as a generic platform language, while .NET is targeted specifically towards Windows. .NET is usually preferable if you want to work with windows/Microsoft specific things.
Upvotes: 2
Reputation: 45071
i think the bottleneck is the FileSystem. Creating 1Mio files in a folder can really stress the HDD and/or the MFT table. Also there could step in some I/O caches which are independent from the application.
Thus leading to different result depending in which order you start your applications or if there are any other application or services trying to access the hard-drive.
So at last i can just say a I/O stress test is a really bad performance indicator for the used programming language.
Upvotes: 8
Reputation: 15699
It depends on how each one was implemented. If you show us how you implemented them both, we might be able to help you better.
Their runtime's are different as well, which always plays a role in performance.
Upvotes: 6