C# vs. Delphi speed for External Sorting [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have a 500+GB text file. it has to be searched for duplicates, remove them, sort and save final file. Of course for such big file, the LINQ or such things are not good at all and will not work so they have to use External Sorting. there is an app called "Send-Safe List Manager". its speed is super fast, for a 200MB txt file it gives the result in less than 10 seconds. after examining inside the exe using "Greatis WinDowse" app i found that it has been written in Delphi. there are some external sorting classes written in C#. i have tested a 200MB file with them and all were over 1 minute. so my question is that for this kind of calculations is Delphi faster than C# and if i have to write my own, then should i use delphi? and with C# can i reach that speed at all?

Properly written sorting code for large file must be disk bound - at that point there essentially no difference what language you use.

Delphi generates native code and also allows for inline assembly, so in theory, maximum speed for a specific algorithm could be easier to reach in Delphi.
However, the performance of what you describe will be tied to the IO performance, and the performance difference between possible algorithms will be of several orders of magnitude more than the Delphi vs. .NET difference.
The language is probably the last thing you should look at if trying to speed that up.

Related

Brute force 7z password testing [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've made a typo in my password back in the days when 7-zip didn't have a 'confirm pwd' field. So now I have a pwd-protected 7-zip file. I've writen some software to generate most likely typo variations of my password (55 million) and stored those in a file per 25k. Now I'm trying them out, one-by-one. I can do about 25k pwd's in an hour, using the unar commandline tool on a Macbook.
It works, but it will still take a nice 100 days (24/7) to go through all 55 mln pwds. Now I'd like to know, if there's some library (c# mono/dotnet) that supports decoding a 7z file that is pwd protected?
Any other suggestions on fixing my problem are also welcome.
To speed up the brute force, look into using CUDA or OpenCL.
These will let you utilise the GPU of the host machine to perform your processing, and will produce results much faster.
25K passwords per hour is quite low - when hash cracking (for example), a good tool using GPU will be able to hit 9500million passwords a minute on a mid-high end GPU.
Whilst hitting that figure is unlikely when trying to break 7z, you could definitely see a speed increase.
Also - the better the PC, the better the result. In many cases a Linux box is your best bet. If you can use a cluster of computers - all the better.

Parsing C# Script into Java [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a way to easily read in a C# file and place it into a Java Object for database storage (storing the class name, functions, variables, etc).
I'm making a Hierarchical State Machine AI Building Tool for a game I'm creating and need to be able to import an existing C# file and store it in a database for retrieval in the future.
Does anyone know of any preexisting libraries for parsing C# files? Something similar to JavaParser?
Thanks everyone!
EDIT: This needs to be part of my Java Project. I'll be loading in the C# files through my Java Application and saving it into my db4o database.
You could use Roslyn, but it would be a bit of work: http://msdn.microsoft.com/en-US/roslyn
Roslyn is only in Preview, by the way. Microsoft hasn't said when the actual release will be out.
This is a C# library. You will need to do the actual parsing with a C# program using Roslyn.
This page talks about an IL to Java byte code compiler called grasshopper, but it doesn't seem to be there anymore. Maybe you could have done that and use reflection after loading the compilates, not sure where that leaves the code itself, if you need that as well.

.Net vs C++ (performance) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
How much of a performance penalty are you paying when going to .Net from a vanilla c++ unmanaged environment. I have heard that the difference is smaller now than what it used to be?
I am referring to a PC environment and not embedded systems
The short answer, it depends on what you are doing. There are several places to read about this.
C++ performance vs. Java/C#
Head-to-head benchmark: C++ vs .NET
C# versus C++ versus Java performance comparison
It's absolutely depends on your project.
But remember itat .Net is not designed for high performance computing, but for high productivity.
So, in cases on stressing performance it will almost always loose in front of c, c++ or say python. But if you measure time you need deliver a simple windows based application, full of modern features,, the story almost always will be inverse.

QuickFix C# or Python [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We are about to implement a small automated securities trader. The trader will be build on top of the excellent quickfix FIX engine.
After due though, we narrowed our options down to implementing it in C# or in Python. Please specify the pros and cons of each language for this task, in term of:
Performance (The fact that Python uses a GIL troubles me in terms of thread concurrency)
Productivity
Scalability (We may need to scale this trader to a fully-sized platform)
EDIT
I've rephrased the question to make it less "C# vs. Python" (which I find irrelevant - both languages have their merits), but I'm simply trying to draw a comparison table before I make the decision.
I like both languages and a think both would be a good choice. The GIL might really be the most important difference. But I'm not sure if it's a problem in your case. The GIL only affects code running in pure Python. I assume that your tool depends more on I/O than on raw number crunching. If your I/O libraries handle the GIL correctly, they can execute concurrent code without problems. And even for number crunching you still have numpy.
My choice would depend on your existing knowledge. If you have experienced C# developers at hand I would go for C#. If you start absolutly from scratch and it's really 50:50, then I would go for Python. It's easier to learn, free and in many cases more productive.
And just to mention it: You might also have a look at IronPython. ;-)
For points "Performance" and "Scalability" I would suggest C# (although a large part of performance depends on your algorithms). Productivity is much of a subjective thing, but now C# has all cool features like lambda, anonymous method, classes etc which makes it much more productive.

Which language is most suitable for an efficient web-crawler? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
i need to write an web crawler and i need need which is best language for performance like memory and performance ..
Edit: Original title was "which language is optimized for speed and perfomance c++ or C#"
i need to write an web crawler
In that case, the internet traffic is probably your bottleneck, so the language does not matter at all.
I'd say that, if you know what you're doing, C++ is more likely to be efficient than C#.
On the flip side, C# is probably easier to work with and to optimize your app in.
So, since you have to ask, I recommend C# in your case. ;)
C++ virtually always offers the best performance of any language that supports modern programming techniques like generic programming and OOP. You pay a price for this though - it's substantially harder to use than C#.
Of course C++. You can manage every byte of memory there, while C# is Managed Code, where you tell the framework what you want to do and the framework does the things you usually do in C++. But if that's the main motive - don't stop at C++ and get right to machine code, Assembly.
A Google search would give you an instant answer - C++ is (generally) a better performing language.

Categories