From: Ryan Leavengood Date: 2001-10-30T04:32:44+09:00 Subject: [ruby-talk:23743] Re: Some inspirations from REBOL > Maybe great, but very slow. Why not make it a standard C-extension and > distribute it with Ruby? It would run on any platform. Yes that is certainly a possibility. But there is no guarantee it will run on any platform. But I suppose if Ruby could be ported to that platform then that library could. But pure Ruby is always more portable than C. > I've implemented LZ77, LZ78, LZW, RLE and BWT (bzip) in pure Ruby and > they are really slow. How slow is really slow? Does it take seconds to process small data or is it just a lot slower than C? Because sure, if you compare it to highly optimized compiled code it will be a lot slower, especially if you write it inefficiently in Ruby (for example using += instead of << with Strings.) But if it can process a meg a second or so then I think that would be sufficient for most people. In the long run I think we should see about making Ruby as fast as possible so that this kind of argument cannot be used anymore. Sure, if you already have a library in C just create a Ruby library in C to interface to it. But if we are developing things anew then I certainly would much rather use Ruby than C. That's the whole point of Ruby isn't it? Ryan