Are you better than me? Then please show me my mistakes..
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:Hi Yohan,
I edited your post to split up some REALLY long lines...it just makes your whole post easier to read.
I can't give you any specific advice, but I will tell you what we always say in the performance forum.
Get a profiler, and look and see where your program is REALLY spending its time. you can guess all you want, but you will inevitably be wrong. There is no reason to try and speed up some part that isn't really taking any time.
Are you better than me? Then please show me my mistakes..
Yohan Weerasinghe wrote:Thanks for the reply. what did you mean by a 'profiler'?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Yohan Weerasinghe wrote:Thanks for the reply. what did you mean by a 'profiler'?
It's a program that can analyse your program while it's running, and give you some idea of what is being executed most.
An alternative to the above suggestion: Ask someone WHY you're trying to parse 500 megabytes of text on an ad hoc basis.
This (I suspect) is the actual source of your problem.
Winston
Are you better than me? Then please show me my mistakes..
Yohan Weerasinghe wrote:1. If the way I am reading files is not the best way, what is the best way? How it should be handled? 500MB file is a Test case. Real file is 4 TeraBytes.
Yohan Weerasinghe wrote:2. Do you think there is "any" place in this code I can use Multi-Threading?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Yohan Weerasinghe wrote:How it should be handled? 500MB file is a Test case. Real file is 4 TeraBytes...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|