- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Some problems in using fstream class with aCC
Operating System - Linux
1745786
Members
3660
Online
108722
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2005 04:49 PM
11-16-2005 04:49 PM
Some problems in using fstream class with aCC
This days, i am using fstream class with aCC, but have some problem below:
I wrote a realy simple program like this: read a testfile which have 1MByte, every time, it reads 8KByte.
If i use stdio.h, it will use 0.005 second, if i use fstream, it will use 0.4 second.
The version of aCC is aCC: HP ANSI C++ B3910B A.03.50
The operation system is: HP-UX n1 B.11.11 U 9000/800
I need help, thank you.
I wrote a realy simple program like this: read a testfile which have 1MByte, every time, it reads 8KByte.
If i use stdio.h, it will use 0.005 second, if i use fstream, it will use 0.4 second.
The version of aCC is aCC: HP ANSI C++ B3910B A.03.50
The operation system is: HP-UX n1 B.11.11 U 9000/800
I need help, thank you.
- Tags:
- fstream
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2006 08:39 PM
03-08-2006 08:39 PM
Re: Some problems in using fstream class with aCC
In general if you want performance you shouldn't be using iostreams. Especially with -AA.
There is a web page with some -AA performance concerns that may help:
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,5520,00.html
Also:
There are three common techniques used by programmers for improving iostream
performance based on specific situations:
1) setting ios_base::sync_with_stdio(false)
Default syncronization with stdio is disabled.
2) setting cin.tie(0)
Unties the cin from other streams.
3) Avoiding endl and using '\n' instead
Endl flushes the output. This might be costly if the endl is
used often, since flush() might result in calling write().
There is a web page with some -AA performance concerns that may help:
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,5520,00.html
Also:
There are three common techniques used by programmers for improving iostream
performance based on specific situations:
1) setting ios_base::sync_with_stdio(false)
Default syncronization with stdio is disabled.
2) setting cin.tie(0)
Unties the cin from other streams.
3) Avoiding endl and using '\n' instead
Endl flushes the output. This might be costly if the endl is
used often, since flush() might result in calling write().
- Tags:
- flush
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP