- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear forumers,
I have a question about the performances of pipes. I do the following exercise:
- I open aC++ pipe in write access
- I open this pipe in Fortran with read access
- I read an ASCII file in C++ and i fill the pipe with all the file contents in buffer
- When C++ has finished writing in pipe, i read all the buffer in Fortran
Note: All is compiled in a same executable, this is a simple performance test.
The file is +/- 10 MB large:
- C++ (VS 2008)takes 0.5 second to read and fill the pipe.
- Fortran (Ifort 11.1)takes 6 seconds to read the pipe contents.
If i read directly the file in Fortran, time is 1 second.
My feeling before using pipe was: "If i read something in pipe, it will be faster than if i read the file on the hard drive". Is my feeling wrong?
Sincerely yours,
F-Xavier
I have a question about the performances of pipes. I do the following exercise:
- I open aC++ pipe in write access
- I open this pipe in Fortran with read access
- I read an ASCII file in C++ and i fill the pipe with all the file contents in buffer
- When C++ has finished writing in pipe, i read all the buffer in Fortran
Note: All is compiled in a same executable, this is a simple performance test.
The file is +/- 10 MB large:
- C++ (VS 2008)takes 0.5 second to read and fill the pipe.
- Fortran (Ifort 11.1)takes 6 seconds to read the pipe contents.
If i read directly the file in Fortran, time is 1 second.
My feeling before using pipe was: "If i read something in pipe, it will be faster than if i read the file on the hard drive". Is my feeling wrong?
Sincerely yours,
F-Xavier
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page