From: Aaron Patterson Date: 2010-07-17T07:21:04+09:00 Subject: [ruby-core:31322] Re: [rubysoc] Queue C-extension patch to come --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 17, 2010 at 06:55:35AM +0900, Ricardo Panaggio wrote: > Sorry for leaving this thread for so long. I've tried to finish the > patch before sending anything back here. >=20 > > I would suggest you provide a working prototype as gem, so opt-in can > > be done and performance comparison can be made. >=20 > It's really difficult doing this as a gem, using the thread.c code as > it is, because there are a lot of statics from thread.c to be used. Which static functions? It looks like everything you're using is public api. Am I missing something? > > Do you have your intermediate work somewhere? >=20 > There's a branch on my ruby fork on github: > http://github.com/panaggio/ruby/tree/queue >=20 > > Send what you've done so far. Maybe we can come up with a way to break > > up the patch. >=20 > I've attached my patch. It looks like this patch is just a port of the ruby code to C, but not using a native queue system. Can you show us benchmarks between this version and the pure ruby implementation? Also, it looks like you're not tainting objects like the original Queue class is. --=20 Aaron Patterson http://tenderlovemaking.com/ --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) iQEcBAEBAgAGBQJMQNmXAAoJEJUxcLy0/6/G56AIAI7m9yGleE/Gdk7BpVt9It83 +SvhLMh1biaV2J4Nr21zbinACoHbvzJiKN2pXihF2McZOjv/ZixthiNplDS677t9 sdosQaQB9z/5TeRpCuftHe6G2MSQN5/8Cee5jShHO1didg2/tSgP+Po3ufE2CPni BHRoiqoiJBXMMUx8ul+bqWCShRvhav5T5F6125VbMarHIfRELE0sdPZZtK6IbUHo oIJCZpNuB/ZaBIbDGf8KaAvRXt7TwzBkIk6/mXP5peJSMaXLj1demTniEg7IEYNI SgP3ROCRgRD+15fF9Y3qfIZS5RcYw2pabfCLdZbbPu9LemKSQEpN6FEyV9ZM69M= =D27P -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--