<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Some problems in using fstream class with aCC in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/some-problems-in-using-fstream-class-with-acc/m-p/3673586#M101515</link>
    <description>This days, i am using fstream class with aCC, but have some problem below:&lt;BR /&gt;&lt;BR /&gt;I wrote a realy simple program like this: read a testfile which have 1MByte, every time, it reads 8KByte.&lt;BR /&gt;&lt;BR /&gt;If i use stdio.h, it will use 0.005 second, if i use fstream, it will use 0.4 second.&lt;BR /&gt;&lt;BR /&gt;The version of aCC is aCC: HP ANSI C++ B3910B A.03.50&lt;BR /&gt;&lt;BR /&gt;The operation system is: HP-UX n1 B.11.11 U 9000/800&lt;BR /&gt;&lt;BR /&gt;I need help, thank you.</description>
    <pubDate>Thu, 17 Nov 2005 00:49:36 GMT</pubDate>
    <dc:creator>LiJianfeng</dc:creator>
    <dc:date>2005-11-17T00:49:36Z</dc:date>
    <item>
      <title>Some problems in using fstream class with aCC</title>
      <link>https://community.hpe.com/t5/operating-system-linux/some-problems-in-using-fstream-class-with-acc/m-p/3673586#M101515</link>
      <description>This days, i am using fstream class with aCC, but have some problem below:&lt;BR /&gt;&lt;BR /&gt;I wrote a realy simple program like this: read a testfile which have 1MByte, every time, it reads 8KByte.&lt;BR /&gt;&lt;BR /&gt;If i use stdio.h, it will use 0.005 second, if i use fstream, it will use 0.4 second.&lt;BR /&gt;&lt;BR /&gt;The version of aCC is aCC: HP ANSI C++ B3910B A.03.50&lt;BR /&gt;&lt;BR /&gt;The operation system is: HP-UX n1 B.11.11 U 9000/800&lt;BR /&gt;&lt;BR /&gt;I need help, thank you.</description>
      <pubDate>Thu, 17 Nov 2005 00:49:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/some-problems-in-using-fstream-class-with-acc/m-p/3673586#M101515</guid>
      <dc:creator>LiJianfeng</dc:creator>
      <dc:date>2005-11-17T00:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Some problems in using fstream class with aCC</title>
      <link>https://community.hpe.com/t5/operating-system-linux/some-problems-in-using-fstream-class-with-acc/m-p/3673587#M101516</link>
      <description>In general if you want performance you shouldn't be using iostreams.  Especially with -AA.&lt;BR /&gt;&lt;BR /&gt;There is a web page with some -AA performance concerns that may help:&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,5520,00.html" target="_blank"&gt;http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,5520,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also:&lt;BR /&gt;There are three common techniques used by programmers for improving iostream&lt;BR /&gt;performance based on specific situations:&lt;BR /&gt;&lt;BR /&gt;1) setting ios_base::sync_with_stdio(false)&lt;BR /&gt;Default syncronization with stdio is disabled.&lt;BR /&gt;&lt;BR /&gt;2) setting cin.tie(0)&lt;BR /&gt;Unties the cin from other streams.&lt;BR /&gt;&lt;BR /&gt;3) Avoiding endl and using '\n' instead&lt;BR /&gt;Endl flushes the output. This might be costly if the endl is&lt;BR /&gt;used often, since flush() might result in calling write().</description>
      <pubDate>Thu, 09 Mar 2006 04:39:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/some-problems-in-using-fstream-class-with-acc/m-p/3673587#M101516</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-03-09T04:39:38Z</dc:date>
    </item>
  </channel>
</rss>

