> ________________________________________
> From: John Damm Sørensen [[email protected]]
> Sent: Thursday, November 27, 2014 3:42 AM
> To: Boisvert, Sebastien
> Subject: Request for Ray improvement
> Hi Sebastien,
> I am writing to you
> regarding the usage of the endl statement in C++ programs.
> Reason is that we have discovered that this statement is a cause of
> inefficient writes which may lead into major problems with file system
> performance.
>
> The problem is that the endl statement cause an explicit flush of buffers
> bypassing other mechanisms to ensure proper/efficient write to the file
> system.
> I noticed that the Ray program is using endl a lot, and fear that it could
> lead to problems in a cluster with very many copies of Ray running at the
> same time.
> I would therefor encourage you to consider using “\n” instead of the endl
> statement and only use endl where an immediate flush of buffers is needed,
> like in a debug situation.
> In the past we have successfully modified other programs using endl to using
> “\n” instead.
Changing all endl to "\n" would be a lot of work.
You can just add:
std::cout.sync_with_stdio(false);
Also, a \n in a printf call usually also calls fflush on the file descriptor
too anyway
for interactive streams.
see http://en.cppreference.com/w/cpp/io/manip/endl
> Thanks
> John
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Denovoassembler-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denovoassembler-users