I have a large binary file to parse, and i am not sure about which language to use in order to improve the performance. Initially, i was going to use C# WPF as GUI, and a c DLL to do the parsing. but my target PC is 64 bit machine. and i had trouble to set up a c DLL project in VS 2008. so i am thinking if i should move to c++ or c# to do the parsing. I am just not sure the file reading speed of c++/C#, since my file is pretty big. the speed is very crucial. could anyone give me some suggestions?
thanks.
I have a large binary file to parse, and i am not sure about
Share
Rather than focus on language (which, as others have mentioned, will have little effect), focus on the approach.
Generally, I recommend using file mapping (available in .NET 4.0 in the new
MemoryMappedFileclass). This is good unless you are doing a single-pass, forward-only scan, which can be done using a regular stream.There are a few hints that unmanaged code can pass to the file open routines that aren’t exposed in .NET (specifically, informing the cache manager that you’re going to access the file randomly or sequentially). The lack of these will probably not give you a noticeable performance impact, though.