From: Eric Hodel Date: 2005-01-24T07:33:06+09:00 Subject: Re: looking at ruby... --Apple-Mail-40--636737314 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 23 Jan 2005, at 13:45, Paris Sinclair wrote: > On Mon, 24 Jan 2005, Eric Hodel wrote: > >> On 22 Jan 2005, at 23:57, Lothar Scholz wrote: >> >>> Hello Eric, >>> EH> Ruby is fast enough >>> EH> for everybody here, and its fast enough for basecamphq.com and >>> EH> 43things.com. >>> But since the ruby community is still very very small this is maybe >>> not a very clever answer. >> >> Commonly, it is the truth. By omitting my full response though, you >> misrepresent my statement. >> >> Writing C extensions in Ruby is hardly more difficult than writing >> plain Ruby code, and with a tool like RubyInline, it only gets >> easier. Beacuse of this, many people find no problem using Ruby >> despite it being slower than other languages. > > So you're saying the common truth is that Ruby is fast enough, but > only if you don't use Ruby but instead C? No. I'm not saying that. I said this: >>> Premature optimization is the root of all evil. Ruby is fast enough >>> for everybody here, and its fast enough for basecamphq.com and >>> 43things.com. >>> >>> If you really need something to be fast, use the 90/10 rule. Find >>> the 10% of your code that does all the work, and use RubyInline to >>> optimize it into C. Most of the time, Ruby is fast enough. Sometimes its not, so find those parts that are most in need of being fast, and rewrite them. > I think it discourages the community from focusing on things like > bytecode, which could solve the problem. In a few weeks, you will be able to amazingly speed up some Ruby code without writing any C. No need for bytecode just yet. Besides, there are plenty of people rewriting Ruby's interpreter, and the true goal of the above work will help out those people who want to make Ruby in Ruby faster. > Because you're speaking as if using C *is* using Ruby. When instead > it's a different language that can be used to work around the > slowness. Have you done it? Ruby's C interface is very close to writing Ruby code, making it very easy to write a Ruby C extension. (I'm also working to fix the problem of context-switching between languages with Ryan Davis.) > It is better than to go the road of tcl, IMO. Denying that slowness is > bad, and so never fixing it. While I'm not working on making Ruby faster, I fear the project may actual do so. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --Apple-Mail-40--636737314 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFB9CW/MypVHHlsnwQRAk80AJ9FoHBCPCAmTmXIurDuClYD5gEkSQCgh2YL CyH3/OErLK34iehf9UOthG8= =16IO -----END PGP SIGNATURE----- --Apple-Mail-40--636737314--