[#45942] win32ole and excel — Martin Stannard <martin@...>

Hi,

19 messages 2002/08/01

[#45948] "gets" blocking process not thread (in Windows only) — Matt Pattison <mfp@...>

The problem with my program is that (in Windows) gets seems to block the entire

13 messages 2002/08/01

[#46030] IO.readlines is slow ? — "Shashank Date" <ADATE@...>

I really like the convenience of doing:

18 messages 2002/08/02

[#46072] How to Load Script from a C Extension? — William Djaja Tjokroaminata <billtj@...>

Hi,

20 messages 2002/08/02

[#46107] embed or swig? — ptkwt@...1.aracnet.com (Phil Tomson)

I'm working a C++ project for a contract I'm doing. Originally, the

21 messages 2002/08/03

[#46128] Assoc Class (Hash Pairs) — Tom Sawyer <transami@...>

i've been thinking about posting this as an RCR.

28 messages 2002/08/03

[#46136] Should this work? — "Hal E. Fulton" <hal9000@...>

Should multiple assignment work for the

17 messages 2002/08/03

[#46192] Detecting when an instance variable is created/set — Harry Ohlsen <harryo@...>

Imagine we have a class like ...

22 messages 2002/08/04
[#46198] Re: Detecting when an instance variable is created/set — Tom Sawyer <transami@...> 2002/08/04

On Sun, 2002-08-04 at 06:03, Harry Ohlsen wrote:

[#46207] Re: Detecting when an instance variable is created/set — Harry Ohlsen <harryo@...> 2002/08/04

> > Can I write a method (of class Object or Kernel, perhaps) that will be

[#46226] Re: Detecting when an instance variable is created/set — Massimiliano Mirra <list@...> 2002/08/04

On Sun, Aug 04, 2002 at 10:32:44PM +0900, Harry Ohlsen wrote:

[#46264] Dynamic creation of classes and methods — Tomasz Wegrzanowski <taw@...>

I want to create classes and methods on fly.

11 messages 2002/08/05

[#46341] More questions on automation from na誰ve Windows user. — Chris Gehlker <gehlker@...>

Hi all,

15 messages 2002/08/05

[#46356] Coding challenge (on Ruby Garden) — David Alan Black <dblack@...>

Hello --

47 messages 2002/08/06

[#46357] Compiling Ruby to Native Code? — web2ed@... (Edward Wilson)

Having looked at OCaml, after following a post to this group, one

20 messages 2002/08/06

[#46426] Is There an Inverse of 'rb_define_method'? — William Djaja Tjokroaminata <billtj@...>

Hi,

15 messages 2002/08/06

[#46442] COM on Unix? — Chris Gehlker <gehlker@...>

As part of my crusade to make Ruby an automation language I read up a little

12 messages 2002/08/06

[#46443] Dup and Clone — "Justin Johnson" <justinj@...>

Could anyone kindly point out the difference between 'dup' and 'clone'?

17 messages 2002/08/06

[#46475] Named paramters again — "Justin Johnson" <justinj@...>

26 messages 2002/08/07
[#46534] Re: Named paramters again — "Gavin Sinclair" <gsinclair@...> 2002/08/07

[#46537] RE: Named paramters again — "Rich Kilmer" <rich@...> 2002/08/07

[#46550] GUI's and the Rouge, Part IV — Kero van Gelder <kero@...>

Funny, two savannah accounts for the same objective:

12 messages 2002/08/07

[#46565] Re: Unicode in Ruby now? — "Marcin 'Qrczak' Kowalczyk" <qrczak@...>

Wed, 7 Aug 2002 16:41:18 +0900, Curt Sampson <cjs@cynic.net> pisze:

12 messages 2002/08/07

[#46732] ambiguity between local variable assignment and writter method — Tom Sawyer <transami@...>

does anyone else find it annoying that local variable assignment is

56 messages 2002/08/09
[#46788] Re: ambiguity between local variable assignment and writter method — dblack@... 2002/08/10

Hi --

[#46791] Re: ambiguity between local variable assignment and writter method — Tom Sawyer <transami@...> 2002/08/10

On Fri, 2002-08-09 at 22:50, dblack@candle.superlink.net wrote:

[#46794] Re: ambiguity between local variable assignment and writter method — dblack@... 2002/08/10

Hi --

[#46734] Re: ambiguity between local variable assignment and writter method — Paul Brannan <pbrannan@...> 2002/08/09

On Sat, Aug 10, 2002 at 03:00:28AM +0900, Tom Sawyer wrote:

[#46737] Re: ambiguity between local variable assignment and writter method — Tom Sawyer <transami@...> 2002/08/09

On Fri, 2002-08-09 at 12:05, Paul Brannan wrote:

[#46739] Re: ambiguity between local variable assignment and writter method — Dave Thomas <Dave@...> 2002/08/09

Tom Sawyer <transami@transami.net> writes:

[#46741] Re: ambiguity between local variable assignment and writter method — GOTO Kentaro <gotoken@...> 2002/08/09

At Sat, 10 Aug 2002 03:44:45 +0900,

[#46748] Re: ambiguity between local variable assignment and writter method — Dave Thomas <Dave@...> 2002/08/09

GOTO Kentaro <gotoken@notwork.org> writes:

[#46753] Re: ambiguity between local variable assignment and writter method — Tom Sawyer <transami@...> 2002/08/09

On Fri, 2002-08-09 at 13:30, Dave Thomas wrote:

[#46841] Ah, I'm finally back from Japan ... — Dossy <dossy@...>

Not like anyone cares (or noticed) but my two week stay in Japan

12 messages 2002/08/10

[#46875] To be a Module, or not to be... — Holden Glova <dsafari@...>

-----BEGIN PGP SIGNED MESSAGE-----

12 messages 2002/08/11

[#46911] Choosing ruby? — Rhymes <raims@...>

27 messages 2002/08/11

[#46957] Handling forms on database driven websites — Philip Mak <pmak@...>

Ever since I learned Perl, Ruby and MySQL, I've built several database

10 messages 2002/08/12

[#47000] Primary Key Hash help — "Chris Morris" <chrismo@...>

I have a huge data file with rows like this:

17 messages 2002/08/12

[#47134] Data_Make_Struct Considered Dangerous? — William Djaja Tjokroaminata <billtj@...>

Hi,

39 messages 2002/08/13

[#47212] Ruby Weekly News — Dave@...

21 messages 2002/08/14

[#47292] Thought question: Where does "new" come from? — "Hal E. Fulton" <hal9000@...>

I've been brooding again on the circularities

28 messages 2002/08/15
[#47342] Re: Thought question: Where does "new" come from? — "Hal E. Fulton" <hal9000@...> 2002/08/15

----- Original Message -----

[#47346] Re: Thought question: Where does "new" come from? — dblack@... 2002/08/15

Hi --

[#47365] Re: Thought question: Where does "new" come from? — "MikkelFJ" <mikkelfj-anti-spam@...> 2002/08/15

[#47369] Re: Thought question: Where does "new" come from? — dblack@... 2002/08/15

Hello --

[#47372] Re: Thought question: Where does "new" come from? — "MikkelFJ" <mikkelfj-anti-spam@...> 2002/08/15

[#47377] Re: Thought question: Where does "new" come from? — dblack@... 2002/08/16

Hi --

[#47344] eruby editor — "Kyle Wilson" <kyle.wilson@...>

Hello. I was wondering if anyone knows of a text editor which will

17 messages 2002/08/15

[#47440] Help with a segv in mod_ruby — Dave Thomas <Dave@...>

14 messages 2002/08/16

[#47461] How do I dup file descriptors in ruby? (diverting STDERR) — "Richard A. Ryan" <ryan@...>

Hello,

12 messages 2002/08/16

[#47464] IDE vs. editor — Holden Glova <dsafari@...>

-----BEGIN PGP SIGNED MESSAGE-----

43 messages 2002/08/16

[#47547] Re: What Ruby needs. — "Shashank Date" <ADATE@...>

I do not have any problem with item 1) on your wish list as long as I don't

13 messages 2002/08/18

[#47559] Ruby Bot — Giuseppe Bilotta <bilotta78@...>

Hello,

14 messages 2002/08/18

[#47643] thread control — "Shashank Date" <ADATE@...>

I am trying to write a ruby script (Ruby 1.7.2 mswin32) which does the

21 messages 2002/08/20

[#47695] What makes a "good" Ruby extension? — Tim Hunter <cyclists@...>

So I'm reading the "Comparing Gui Toolkits" wiki page

14 messages 2002/08/20

[#47749] What New Language After Ruby? — William Djaja Tjokroaminata <billtj@...>

To Andrew Hunt and David Thomas:

74 messages 2002/08/21
[#47754] Re: What New Language After Ruby? — Wilkes Joiner <boognish23@...> 2002/08/21

Although activity seems to have died down, here are some links

[#47817] A Repeat: New Language After Ruby? — William Djaja Tjokroaminata <billtj@...>

Hi,

54 messages 2002/08/21
[#47820] RE: A Repeat: New Language After Ruby? — " JamesBritt" <james@...> 2002/08/21

[#47918] Win32 Scripting — Sean Middleditch <elanthis@...>

Hi,

13 messages 2002/08/22

[#48035] Why Ruby Uses Mark-and-Sweep GC? — William Djaja Tjokroaminata <billtj@...>

Hi,

39 messages 2002/08/23

[#48062] Ruby and Judy — Joseph McDonald <joe@...>

29 messages 2002/08/23

[#48082] Distributed Object Container — junderdown@... (Jason Underdown)

Is anyone out there in the Ruby community working on an object

23 messages 2002/08/24
[#48185] Re: Distributed Object Container — "Gavin Sinclair" <gsinclair@...> 2002/08/26

----- Original Message -----

[#48223] Ruby Based App Server — junderdown@... (Jason Underdown)

I posted a similar question a few days ago, but didn't get any

21 messages 2002/08/26

[#48264] Ruby developers: help push RPKG development and usage forward!! (it is like CPAN.pm, only Ruby) — itsnewsforme@... (M S)

A big complaint from people looking into Ruby is that they don't see

36 messages 2002/08/27
[#48292] Re: Ruby developers: help push RPKG development and usage forward!! (it is like CPAN.pm, only Ruby) — ts <decoux@...> 2002/08/27

>>>>> "M" == M S <itsnewsforme@yahoo.ca> writes:

[#48296] RE: Ruby developers: help push RPKG development and usage forward!! (it is like CPAN.pm, only Ruby) — "Rich Kilmer" <rich@...> 2002/08/27

Actually, it would be nice to have them online, but not necessarily

[#48336] Re: Ruby developers: help push RPKG development and usage forward!! (it is like CPAN.pm, only Ruby) — Massimiliano Mirra <list@...> 2002/08/27

On Tue, Aug 27, 2002 at 09:39:32PM +0900, Rich Kilmer wrote:

[#48358] RE: Ruby developers: help push RPKG development and usage forward!! (it is like CPAN.pm, only Ruby) — "Rich Kilmer" <rich@...> 2002/08/28

http://kt-www.jaist.ac.jp/~ttate/ruby/ruby-dl.html

[#48362] RE: Ruby developers: help push RPKG development and usage forward!! (it is like CPAN.pm, only Ruby) — Tom Sawyer <transami@...> 2002/08/28

On Tue, 2002-08-27 at 19:32, Rich Kilmer wrote:

[#48367] RE: Ruby developers: help push RPKG development and usage forward!!(it is like CPAN.pm, only Ruby) — "Rich Kilmer" <rich@...> 2002/08/28

You can just install it in another directory and then go to that

[#48369] RE: Ruby developers: help push RPKG development and usage forward!!(it is like CPAN.pm, only Ruby) — Tom Sawyer <transami@...> 2002/08/28

uh, sorry, how do i get 1.7.2? i tried anonymous cvs but it said NO. did

[#48371] RE: Ruby developers: help push RPKG development and usageforward!!(it is like CPAN.pm, only Ruby) — "Rich Kilmer" <rich@...> 2002/08/28

Nightly CVS snapshot:

[#48274] ANN: RJudy-0.1 - Judy Arrays for Ruby — Lyle Johnson <lyle@...>

All,

17 messages 2002/08/27

[#48477] Newbie converting brain from perl — William Pietri <william-news-383910@...>

20 messages 2002/08/28

[#48544] Best GC for Ruby? — "Justin Johnson" <justinj@...>

34 messages 2002/08/29

[#48573] FXRuby Threading Problem Solved? — Lyle Johnson <lyle@...>

All,

14 messages 2002/08/29

[#48584] suggestions to the Ruby community — stibbs <stibbs@...>

Hi, first i would like to state that i absolutely love Ruby more than any

85 messages 2002/08/29
[#48923] Re: suggestions to the Ruby community — <bbense+comp.lang.ruby.Sep.03.02@...> 2002/09/03

-----BEGIN PGP SIGNED MESSAGE-----

[#48930] RE: suggestions to the Ruby community — " JamesBritt" <james@...> 2002/09/03

> >I was surprised just now to find that there is no absolute requirement

[#49017] Re: suggestions to the Ruby community — <bbense+comp.lang.ruby.Sep.04.02@...> 2002/09/04

-----BEGIN PGP SIGNED MESSAGE-----

[#48657] ICFP Programming Contest — Alan Chen <alan@...>

http://icfpcontest.cse.ogi.edu/task.html

12 messages 2002/08/30

[#48705] Ruby aesthetics — vegai@...

Hello. I've been checking into python lately quite a lot, and I

192 messages 2002/08/31
[#49010] Re: Ruby aesthetics — "Hal E. Fulton" <hal9000@...> 2002/09/04

----- Original Message -----

[#49100] Re: Ruby aesthetics — Paul Prescod <paulp@...> 2002/09/05

On Thu, 5 Sep 2002, Hal E. Fulton wrote:

[#49112] Re: Ruby aesthetics — William Djaja Tjokroaminata <billtj@...> 2002/09/05

Hi,

[#49154] Re: Ruby aesthetics — Paul Prescod <paulp@...> 2002/09/05

On Thu, 5 Sep 2002, William Djaja Tjokroaminata wrote:

[#49161] Re: Ruby aesthetics — Christian Szegedy <szegedy@...> 2002/09/05

Paul Prescod wrote:

[#49173] Re: Ruby aesthetics — William Djaja Tjokroaminata <billtj@...> 2002/09/05

Hi,

[#49183] Re: Ruby aesthetics — <paul@...> 2002/09/05

On Fri, 6 Sep 2002, William Djaja Tjokroaminata wrote:

[#49189] Re: Ruby aesthetics — William Djaja Tjokroaminata <billtj@...> 2002/09/05

I think we have communicated very well; I agree with all you said. May I

[#49191] Re: Ruby aesthetics — <paul@...> 2002/09/05

On Fri, 6 Sep 2002, William Djaja Tjokroaminata wrote:

[#49272] Re: Ruby aesthetics — William Djaja Tjokroaminata <billtj@...> 2002/09/06

Hi Matz,

[#49293] Re: Ruby aesthetics — matz@... (Yukihiro Matsumoto) 2002/09/06

Hi,

[#49312] Re: Ruby aesthetics — <paul@...> 2002/09/06

On Sat, 7 Sep 2002, Yukihiro Matsumoto wrote:

[#49321] Re: Ruby aesthetics — dblack@... 2002/09/06

Hello --

Re: ANN: RJudy-0.1 - Judy Arrays for Ruby

From: "MikkelFJ" <mikkelfj-anti-spam@...>
Date: 2002-08-27 23:02:50 UTC
List: ruby-talk #48348
"Joseph McDonald" <joe@vpop.net> wrote in message
news:67659612452.20020827105228@vpop.net...

> Another datapoint:
> Time to insert 1000000 words into a JudySL array: 6907858.0 usec.
>
> Doing the same with a straight C program took 3 seconds.  I think the
> extra 3.9 seconds is spent in rubyland doing this:

I did a test of different 32 bit key to 32 bit data. If someone would add
more datastructures to this test, such as Judy, I'd be interested.

Below is the log I wrote during the test.

Mikkel


<snip>
Comparison of skiplist, stl map, BTree and Hash table.
All tests are 32bit key, 32bit value maps with no duplicates.

Speed

Machine Pentium II 300MHz with 500MB SDRAM.
The size of dataset was chosen to avoid excessive trashing when having
several containers in the air simultanously.

The output is shown below.
The test run stores and retrieves

    500000 unique keys

one run is with sequential numbers 0, 1,... 499,999
one run is with randome numbers (rand() * rand()) with duplicates stripped,
totalling
500,000 different values.

Surprisingly, all the maps seems to prefer the linear values.
But the relative performance between the maps differs signicantly between.

STL is generally a factor 3, 4 (insert,find) off the hashtable.

The BTree is twice as fast as the hashtable at insertion with linear keys,
and about the same in search speed. The hashtable is probably spending time
growing its bucket table to reduce collisions, but quality of hash also
matters.

With random keys, the BTree is 1.7,2.7 slower than the Hash.
Since the hash is constant time, it is faster for larger keys, but it also
uses more
memory. Both are friendly to disk cache. It is difficult to measure, but the
BTree
is probably faster than the hash for small sets. This will require a
different test.
Note that the BTree has a preferred nodesize around 14 elements both at
leafs and internally.
There suspected reasons:
1) CPU cachelines 2) the cost of moving data during insertion and 3) each
node is searched
in a tight linear loop. The node could be larger if the search were binary,
but it is only
faster after at least 100 entries per node and at that point the factors 1),
2) starts to set
in. For dumping the tree to disk, it would be possible to flatten nodes.

The skiplist does not perform consistently. It can be 8 times slower than
the
hashtable at find random keys, and 2 times slower than STL
(which in turn is 4 times slower than hash). For insert it is equal to STL
in insertion.
But with linear keys it inserts as fast as the Hash (where the BTree is
twice as fast).
It finds at half the speed of the hash and 1.6 off the BTree.
Compared to the STL map, the skiplist is very fast with 0.3 times the insert
time of overhead
and still twice as fast at finding.
When searching, it always has to visit a node to decide its key. Compare
this to the BTree,
which caches the keys of the childnodes in the parent node. This makes for a
very fast scan.
The BTree could save space by visiting the childnodes, but it would be
slower - like the skiplist.
The skiplist has no locality. The skiplist could be transposed to a BTree
like structure such
that each level is stored in one more linked buffers on disk. This would add
locality.
It may be interesting to see if this also works in memory - it could make
the skiplist as fast
or faster than the BTree without the complexity.

Code complexity

All collections are implemented by me,
except the STL map which is from Microsoft Visual Studio 7.0.

The BTree is very complex. It uses 100K of code - although this is covers
some testcode and various
optional behaviour such as topdown instead of bottom insertions etc.
The STL map is probably a red/black tree but this has not been investigated.
Both the BTree and the STL map are too complex to easily customize for
special purposes.

The Skiplist and the Hashtable both uses 3-400 lines of code and are both
easy to adapt
to special purposes.

Memory

The Hashtable does not take op many lines of code. It grows dynamically so
it can start small.
But it is not significantly faster for small datasets so some other
collections may be preferable
here. It has some overhead in that the empty hash with no entries still
keeps 10 32bit values for
handling its buffers. It can start with a small buffer of say 4 to 8
entries. Each entry consumes
4 32bit values. The hashbucket adds 50% by having twice the number of
entries, each using a
single 32bit value. Hence Each entry uses 6 32bit values. With an initial
size of 4 entries,
this amounts to 10 + 6 * 4 = 34 32bit values. This is about the same as the
BTree for the initial
storage - but it also uses two allocations which may have allocation
overhead.
When the Hashtable grows, it consitently adds 6 32bit values per entry,
which is expensive.
When the BTree grows, it uses 2 32bit values per leaf entry and some node
overoverhead, say 25%
and much less if nodes are chosen large. Due to the large branchfactor, the
size of the parent
nodes can be ignored. For binary tries there would be as many internal nodes
as leaf nodes.
Without exact calculations, lets to just estimate the overhead to be no more
than 50% in total.
This yields 3 32bit values per entry. However, BTrees may be half empty.
Estimating 75% usage,
this roughly becomes 4 32bit values per entry.

The skiplist which uses 2 32bit values per entry for key/value, plus 1.3
pointers per node.
It has only a single null pointer in its empty state. It needs a header
which is a least the
size of the smallest node. This translates into a smallest entry of 3 + 3 =
6 32bit values,
pluts the pointer to the handle. Since the header is chosen slightly larger
to avoid reallocation
immediately, this makes a total of 8 32bit values with a single entry.
This is 3 or 4 times less than than a BTree and a Hashtable initial entry.

A guess is that the STL map uses about 5 32bit values per node: key, value,
left, right, color.
Although the color could be stored as a tagged pointer reducing this to 4
32bit values.
An initial entry including the actual map variable will probably be about 8
32bit values,
and it will grow with about 4 32bit values per entry.

The BTree has the most cachefriendly nature because it keeps locality and
frequently used
paths down the tree has a good chance of a cache hit. The Hashtable shows
that storing data
in a single dynamically growing buffer also works well.
The performance tests does not tell how the BTree would work compared to the
hashtable for
real usage. Here all the values are visited. It is expected that the BTree
will perform better
on actual data access due to its cachefriendly nature. Likewise, it is
expected that
the skiplists and STL maps are not too kind on the cache, and some of this
probably also shows
in the performance numbers.


Data


dump with 500,000 linear keys
(never mind the dump saying random - it is linear)
=============================
This first measure creates a CPU independent time measure
and measures operations relative to the cost of creating a key

Time to create 5000000 keys
0.3 seconds, relative time 1.0
Time to insert 500000 random values into STL map
2.7 seconds, relative time 92.9
Time to find 500000 random values in STL map
1.4 seconds, relative time 47.3
Time to insert 500000 random values into skiplist
0.8 seconds, relative time 27.3
Time to find 500000 random values in skiplist
0.7 seconds, relative time 23.5
Time to insert 500000 random values into BTree
0.4 seconds, relative time 13.5
Time to find 500000 random values in BTree
0.4 seconds, relative time 14.5
Time to insert 500000 random values into hashtable (single-keyed)
0.7 seconds, relative time 25.6
Time to find 500000 random values in hashtable
0.4 seconds, relative time 12.1

----
STL / Hash insert ratio: 3.6
STL / Hash find ratio: 3.9
BTree / Hash insert ratio: 0.5
BTree / Hash find ratio: 1.2
BTree / STL insert ratio: 0.1
BTree / STL find ratio: 0.3
SkipList / Hash insert ratio: 1.1
SkipList / Hash find ratio: 1.9
SkipList / BTree insert ratio: 2.0
SkipList / BTree find ratio: 1.6
SkipList / STL insert ratio: 0.3
SkipList / STL find ratio: 0.5
=============================

dump with 500,000 unique random keys
=============================
Time to create 5000000 keys
0.3 seconds, relative time 1.0
Time to insert 500000 random values into STL map
3.0 seconds, relative time 103.6
Time to find 500000 random values in STL map
2.1 seconds, relative time 70.8
Time to insert 500000 random values into skiplist
3.3 seconds, relative time 115.3
Time to find 500000 random values in skiplist
4.0 seconds, relative time 139.5
Time to insert 500000 random values into BTree
1.5 seconds, relative time 53.2
Time to find 500000 random values in BTree
1.3 seconds, relative time 44.6
Time to insert 500000 random values into hashtable (single-keyed)
0.9 seconds, relative time 31.1
Time to find 500000 random values in hashtable
0.5 seconds, relative time 16.6

----
STL / Hash insert ratio: 3.3
STL / Hash find ratio: 4.3
BTree / Hash insert ratio: 1.7
BTree / Hash find ratio: 2.7
BTree / STL insert ratio: 0.5
BTree / STL find ratio: 0.6
SkipList / Hash insert ratio: 3.7
SkipList / Hash find ratio: 8.4
SkipList / BTree insert ratio: 2.2
SkipList / BTree find ratio: 3.1
SkipList / STL insert ratio: 1.1
SkipList / STL find ratio: 2.0
=============================
</snip>


In This Thread