digitalmars.D - stdio and Tango I/O performance
- Andrei Alexandrescu (See Website For Email) (20/20) Mar 21 2007 Over the past couple of weeks Walter and I have worked on improving the
- Lars Ivar Igesund (16/21) Mar 21 2007 If you have actually tested Tango IO and finds it to be slower than
- Andrei Alexandrescu (See Website For Email) (3/22) Mar 21 2007 This is a misunderstanding. To date I haven't downloaded Tango.
- Lars Ivar Igesund (9/31) Mar 21 2007 Then you should before making any sorts of comments in this vein. Maybe ...
- Andrei Alexandrescu (See Website For Email) (6/32) Mar 21 2007 Could you please put the gun down. Sheesh. Which comments? What vein? It...
- Sean Kelly (6/11) Mar 21 2007 I think the Tango IO package is all about only paying for what you need....
- Lars Ivar Igesund (12/44) Mar 21 2007 No, I was not offended (not easily done), but I did find your wording
- Andrei Alexandrescu (See Website For Email) (9/49) Mar 21 2007 Excellent! I have collected some data on stdio and a couple of
- Sean Kelly (7/15) Mar 21 2007 It was moved to /install/install-dmd.sh, and I guess we missed updating
- Sean Kelly (3/16) Mar 21 2007 Oops, I misunderstood. That link also has instructions for how to
- Walter Bright (24/28) Mar 21 2007 Phobos' std.stdio's performance sucked because I'd never done a
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (14/21) Mar 21 2007 It's excellent news that std.stdio is finally getting revamped!
- Andrei Alexandrescu (See Website For Email) (7/17) Mar 21 2007 The only concern is the risk of concurrent development of stdio and
Over the past couple of weeks Walter and I have worked on improving the stdio module, following my shocking discovery that its performance was inadequate for any amount of serious coding. To say nothing about the lack of the input routines readf, readln, etc. The good news is that Walter and myself have improved stdio's reading performance by an order of magnitude when compared to a naive implementation using fgetc(). Now reading is almost as fast as C would allow you, beats Perl and C++, (Perl is harder to beat than C++), while writef* is still suboptimal (but write without "f" is fast because it forwards to the C routine). I was actually surprised that nobody seems to have discovered the abysmal performance of the writef family. If they did, they would have likely posted reports on this newsgroup. This ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio. Thanks, Andrei
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:This ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio.If you have actually tested Tango IO and finds it to be slower than the "new" stdio, then this would be interesting to know, and also the test harness in use. If not, I find your suggestive tone above to be rather rude, given the time put into making Tango IO as good as possible. If the IO in Phobos has been as slow as you say, I highly doubt that Tango has been in similar ranges, given that it obviates C IO by going directly to the OS via a buffer. Now, if you have tested that Tango's IO is slower than Phobos, then maybe you could spend some time helping to improve it too? Your approach above is rather unconstructive in an overall fashion. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 21 2007
Lars Ivar Igesund wrote:Andrei Alexandrescu (See Website For Email) wrote:This is a misunderstanding. To date I haven't downloaded Tango. AndreiThis ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio.If you have actually tested Tango IO and finds it to be slower than the "new" stdio, then this would be interesting to know, and also the test harness in use. If not, I find your suggestive tone above to be rather rude, given the time put into making Tango IO as good as possible. If the IO in Phobos has been as slow as you say, I highly doubt that Tango has been in similar ranges, given that it obviates C IO by going directly to the OS via a buffer. Now, if you have tested that Tango's IO is slower than Phobos, then maybe you could spend some time helping to improve it too? Your approach above is rather unconstructive in an overall fashion.
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:Lars Ivar Igesund wrote:Then you should before making any sorts of comments in this vein. Maybe you even should have compared Tango's IO performance to Phobos' prior to making such huge efforts to improve on it (Phobos IO)? -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoAndrei Alexandrescu (See Website For Email) wrote:This is a misunderstanding. To date I haven't downloaded Tango.This ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio.If you have actually tested Tango IO and finds it to be slower than the "new" stdio, then this would be interesting to know, and also the test harness in use. If not, I find your suggestive tone above to be rather rude, given the time put into making Tango IO as good as possible. If the IO in Phobos has been as slow as you say, I highly doubt that Tango has been in similar ranges, given that it obviates C IO by going directly to the OS via a buffer. Now, if you have tested that Tango's IO is slower than Phobos, then maybe you could spend some time helping to improve it too? Your approach above is rather unconstructive in an overall fashion.
Mar 21 2007
Lars Ivar Igesund wrote:Andrei Alexandrescu (See Website For Email) wrote:Could you please put the gun down. Sheesh. Which comments? What vein? It was a question. I simply asked whether there has been performance work on Tango's I/O, without having any prior experience with it. I don't see reason for anyone to get offended about that. AndreiLars Ivar Igesund wrote:Then you should before making any sorts of comments in this vein. Maybe you even should have compared Tango's IO performance to Phobos' prior to making such huge efforts to improve on it (Phobos IO)?Andrei Alexandrescu (See Website For Email) wrote:This is a misunderstanding. To date I haven't downloaded Tango.This ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio.If you have actually tested Tango IO and finds it to be slower than the "new" stdio, then this would be interesting to know, and also the test harness in use. If not, I find your suggestive tone above to be rather rude, given the time put into making Tango IO as good as possible. If the IO in Phobos has been as slow as you say, I highly doubt that Tango has been in similar ranges, given that it obviates C IO by going directly to the OS via a buffer. Now, if you have tested that Tango's IO is slower than Phobos, then maybe you could spend some time helping to improve it too? Your approach above is rather unconstructive in an overall fashion.
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:Could you please put the gun down. Sheesh. Which comments? What vein? It was a question. I simply asked whether there has been performance work on Tango's I/O, without having any prior experience with it. I don't see reason for anyone to get offended about that.I think the Tango IO package is all about only paying for what you need. This is one reason for its modular design. That said, I don't think anyone has ever done a performance comparison with C, Phobos, etc. If you're inclined to do so, I would love to see the results. Sean
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:Lars Ivar Igesund wrote:No, I was not offended (not easily done), but I did find your wording suggestive. And you did give the impression that you had _some_ knowledge of Tango. As for that exact question; yes, performance is an important facet of Tango, IO likewise. Slow IO in Tango would be a defect. And it would be nice to have an unbiased comparison of the two. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoAndrei Alexandrescu (See Website For Email) wrote:Could you please put the gun down. Sheesh. Which comments? What vein? It was a question. I simply asked whether there has been performance work on Tango's I/O, without having any prior experience with it. I don't see reason for anyone to get offended about that.Lars Ivar Igesund wrote:Then you should before making any sorts of comments in this vein. Maybe you even should have compared Tango's IO performance to Phobos' prior to making such huge efforts to improve on it (Phobos IO)?Andrei Alexandrescu (See Website For Email) wrote:This is a misunderstanding. To date I haven't downloaded Tango.This ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio.If you have actually tested Tango IO and finds it to be slower than the "new" stdio, then this would be interesting to know, and also the test harness in use. If not, I find your suggestive tone above to be rather rude, given the time put into making Tango IO as good as possible. If the IO in Phobos has been as slow as you say, I highly doubt that Tango has been in similar ranges, given that it obviates C IO by going directly to the OS via a buffer. Now, if you have tested that Tango's IO is slower than Phobos, then maybe you could spend some time helping to improve it too? Your approach above is rather unconstructive in an overall fashion.
Mar 21 2007
Lars Ivar Igesund wrote:Andrei Alexandrescu (See Website For Email) wrote:Excellent! I have collected some data on stdio and a couple of baselines, and I'll install Tango now. In fact I've already hit a hitch: README.txt sends the reader to http://dsource.org/projects/tango/wiki/TopicInstallTango which says one should run ./lib/install-dmd.sh, which is not to be found in the distribution... probably I'll need to set an account on dsource.org and ask there. AndreiLars Ivar Igesund wrote:No, I was not offended (not easily done), but I did find your wording suggestive. And you did give the impression that you had _some_ knowledge of Tango. As for that exact question; yes, performance is an important facet of Tango, IO likewise. Slow IO in Tango would be a defect. And it would be nice to have an unbiased comparison of the two.Andrei Alexandrescu (See Website For Email) wrote:Could you please put the gun down. Sheesh. Which comments? What vein? It was a question. I simply asked whether there has been performance work on Tango's I/O, without having any prior experience with it. I don't see reason for anyone to get offended about that.Lars Ivar Igesund wrote:Then you should before making any sorts of comments in this vein. Maybe you even should have compared Tango's IO performance to Phobos' prior to making such huge efforts to improve on it (Phobos IO)?Andrei Alexandrescu (See Website For Email) wrote:This is a misunderstanding. To date I haven't downloaded Tango.This ate a lot of time measuring, testing, and optimizing. So I have a question - has anyone verified that Tango's I/O performance is up to snuff? I see it imposes the dynamic-polymorphic approach, and unless there was some serious performance work going on, it's possible it's even slower than stdio.If you have actually tested Tango IO and finds it to be slower than the "new" stdio, then this would be interesting to know, and also the test harness in use. If not, I find your suggestive tone above to be rather rude, given the time put into making Tango IO as good as possible. If the IO in Phobos has been as slow as you say, I highly doubt that Tango has been in similar ranges, given that it obviates C IO by going directly to the OS via a buffer. Now, if you have tested that Tango's IO is slower than Phobos, then maybe you could spend some time helping to improve it too? Your approach above is rather unconstructive in an overall fashion.
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:Excellent! I have collected some data on stdio and a couple of baselines, and I'll install Tango now. In fact I've already hit a hitch: README.txt sends the reader to http://dsource.org/projects/tango/wiki/TopicInstallTango which says one should run ./lib/install-dmd.sh, which is not to be found in the distribution... probably I'll need to set an account on dsource.org and ask there.It was moved to /install/install-dmd.sh, and I guess we missed updating the README :-) If you want to do a manual install, the instructions are here: http://www.dsource.org/projects/tango/wiki/TopicInstallTango Personally, I just publish the appropriate stuff to /include/d/tango and /usr/lib directly from the SVN tree via a script. Sean
Mar 21 2007
Sean Kelly wrote:Andrei Alexandrescu (See Website For Email) wrote:Oops, I misunderstood. That link also has instructions for how to perform a manual install.Excellent! I have collected some data on stdio and a couple of baselines, and I'll install Tango now. In fact I've already hit a hitch: README.txt sends the reader to http://dsource.org/projects/tango/wiki/TopicInstallTango which says one should run ./lib/install-dmd.sh, which is not to be found in the distribution... probably I'll need to set an account on dsource.org and ask there.It was moved to /install/install-dmd.sh, and I guess we missed updating the README :-) If you want to do a manual install, the instructions are here: http://www.dsource.org/projects/tango/wiki/TopicInstallTango
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:Could you please put the gun down. Sheesh. Which comments? What vein? It was a question. I simply asked whether there has been performance work on Tango's I/O, without having any prior experience with it. I don't see reason for anyone to get offended about that.Phobos' std.stdio's performance sucked because I'd never done a benchmark of it. It was one of those things I cranked out because something was needed, intending to go back and optimize later but never did... Anyhow, Andrei's and my experiments with stdio once again showed that designing something to be fast and it actually being fast are two very different things. We were misled several times by our own preconceived notions about what was cheap and what was expensive. Nothing beats actually running a benchmark. The benchmarks we used were all trivial programs, like a loop that just reads its stdin, line by line, and then stuffing a 30 Mb file down its maw. For example: import std.stdio; int main() { char[] buf; while (readln(stdin, buf)) { } return 0; } Yes, readln() will be in the next update. Our benchmarking also suggested a couple performance related improvements to the gc interface, which I am working on.
Mar 21 2007
Andrei Alexandrescu (See Website For Email) wrote:Over the past couple of weeks Walter and I have worked on improving the stdio module, following my shocking discovery that its performance was inadequate for any amount of serious coding. To say nothing about the lack of the input routines readf, readln, etc.It's excellent news that std.stdio is finally getting revamped! Hopefully you were able to make some use of our previous code and suggestions, from the discussions held earlier (in 2005).I was actually surprised that nobody seems to have discovered the abysmal performance of the writef family. If they did, they would have likely posted reports on this newsgroup.I'm afraid that at least some were more worried about the missing features initially, and figured that performance would come "later". Or even that one should use the std.c.stdio functions instead... For the greatest of times, printf was the recommended output method. (for instance, looking at "hello.d" in DMD 1.009 shows printf use. Looking at the "pi.d" example, and it shows using using sscanf ?) BTW: I don't think there is anything wrong with using "C" I/O routines, on the contrary it is very useful when quickly porting programs over, but it does suggest that "D" I/O methods in Phobos were not up to it ? --anders
Mar 21 2007
Anders F Björklund wrote:Andrei Alexandrescu (See Website For Email) wrote:The only concern is the risk of concurrent development of stdio and Tango's I/O. It would be best to not balkanize the community by presenting them functionally almost equivalent interfaces. Phobos already has two, no, three mutually incompatible ways of dealing with files. I don't know how this can be approached effectively. AndreiOver the past couple of weeks Walter and I have worked on improving the stdio module, following my shocking discovery that its performance was inadequate for any amount of serious coding. To say nothing about the lack of the input routines readf, readln, etc.It's excellent news that std.stdio is finally getting revamped! Hopefully you were able to make some use of our previous code and suggestions, from the discussions held earlier (in 2005).
Mar 21 2007