Click here to Skip to main content
15,914,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Sort an std::vector?! Pin
Jun Du21-Jun-06 4:59
Jun Du21-Jun-06 4:59 
AnswerRe: Sort an std::vector?! Finished! Pin
bosfan21-Jun-06 20:58
bosfan21-Jun-06 20:58 
QuestionHuge size files IO- Performance issue? Pin
jayart21-Jun-06 3:53
jayart21-Jun-06 3:53 
AnswerRe: Huge size files IO- Performance issue? Pin
jayart21-Jun-06 3:56
jayart21-Jun-06 3:56 
QuestionRe: Huge size files IO- Performance issue? Pin
David Crow21-Jun-06 4:11
David Crow21-Jun-06 4:11 
AnswerRe: Huge size files IO- Performance issue? Pin
jayart21-Jun-06 6:02
jayart21-Jun-06 6:02 
GeneralRe: Huge size files IO- Performance issue? Pin
David Crow21-Jun-06 6:21
David Crow21-Jun-06 6:21 
GeneralRe: Huge size files IO- Performance issue? Pin
Zac Howland21-Jun-06 4:21
Zac Howland21-Jun-06 4:21 
I'm hoping you meant 4 MB and not 4 GB. Loading a 4 GB file into memory would be extremely painful and slow your system down to a crawl (if the system even lets you allocate the buffer to begin with). Not to mention that displaying such a file would be insane since no one in their right mind would be able to read 4 GB of data.

That said, if you did mean 4 MB, just load it into a memory buffer. The load operation will be slow, but all operations after that will be much faster. If you are doing this for a lot of files, I would try to come up with some sort of bufferring scheme to minimize the amount of memory needed to hold all the files data (e.g. cache the most recent data and serialize the rest to a temporary file until they become active again).

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac
AnswerRe: Huge size files IO- Performance issue? Pin
Ryan Binns21-Jun-06 4:29
Ryan Binns21-Jun-06 4:29 
AnswerRe: Huge size files IO- Performance issue? Pin
James R. Twine21-Jun-06 6:52
James R. Twine21-Jun-06 6:52 
Questionabout FARPROC* Pin
George_George21-Jun-06 3:05
George_George21-Jun-06 3:05 
AnswerRe: about FARPROC* Pin
zouchao111221-Jun-06 3:14
zouchao111221-Jun-06 3:14 
GeneralRe: about FARPROC* Pin
George_George21-Jun-06 17:20
George_George21-Jun-06 17:20 
AnswerRe: about FARPROC* Pin
Sarath C21-Jun-06 3:22
Sarath C21-Jun-06 3:22 
GeneralRe: about FARPROC* Pin
George_George21-Jun-06 17:35
George_George21-Jun-06 17:35 
AnswerRe: about FARPROC* Pin
David Crow21-Jun-06 3:29
David Crow21-Jun-06 3:29 
GeneralRe: about FARPROC* Pin
George_George21-Jun-06 17:40
George_George21-Jun-06 17:40 
GeneralRe: about FARPROC* Pin
David Crow22-Jun-06 2:39
David Crow22-Jun-06 2:39 
GeneralRe: about FARPROC* Pin
George_George24-Jun-06 2:09
George_George24-Jun-06 2:09 
GeneralRe: about FARPROC* Pin
David Crow26-Jun-06 2:44
David Crow26-Jun-06 2:44 
GeneralRe: about FARPROC* Pin
George_George27-Jun-06 2:17
George_George27-Jun-06 2:17 
GeneralRe: about FARPROC* Pin
David Crow27-Jun-06 3:15
David Crow27-Jun-06 3:15 
GeneralRe: about FARPROC* Pin
George_George27-Jun-06 3:43
George_George27-Jun-06 3:43 
GeneralRe: about FARPROC* Pin
David Crow27-Jun-06 3:48
David Crow27-Jun-06 3:48 
GeneralRe: about FARPROC* Pin
George_George27-Jun-06 4:14
George_George27-Jun-06 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.