Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #906 > unrolled thread
| Started by | "aminer" <aminer@videotron.ca> |
|---|---|
| First post | 2012-05-30 18:34 -0500 |
| Last post | 2012-06-02 18:40 -0500 |
| Articles | 7 — 1 participant |
Back to article view | Back to comp.programming.threads
Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-05-30 18:34 -0500
Re: Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-05-30 18:38 -0500
Re: Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-05-30 18:46 -0500
Re: Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-06-02 18:38 -0500
Re: Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-06-02 18:52 -0500
Re: Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-06-02 18:56 -0500
Re: Parallelhashlist was updated to version 1.41 ... "aminer" <aminer@videotron.ca> - 2012-06-02 18:40 -0500
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-05-30 18:34 -0500 |
| Subject | Parallelhashlist was updated to version 1.41 ... |
| Message-ID | <jq67al$4i9$1@dont-email.me> |
Hello all, I have updated parallelhashlist to version 1.41.. I have modified parallelhashlist to use 128 locks, but you have to use a hashsize in power of 2 and greater to 1000, how do you pass a hashsize in power of 2 to the constructor? by using shl operation like this trait:=TCaseinsensitiveTraits.create;; hash1:=TParallelHashList.create(trait,1 shl 25); Why do you have to use a power of 2 ? Please read this: Power-of-Two Hash Table Size "Any data structures 101 book will say choose a prime for the number of buckets, so that the bucket's index can easily be computed by h(k) = k mod m, where k is the key value and m is the bucket size. While this approach is straight-forward, there are a number of issues with it, including slow modulo performance. ConcurrentHashMap instead uses a power-of-two rule" http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html I am using modulo functions inside parallelhashlist, and using a number of locks in power of 2, so you have to use hashsize in power of 2 , this will make the modulo function of the delphi and freepascal compilers 10X faster. You can download parallelhashlist version 1.41 from: http://pages.videotron.com/aminer/ Thank you. Amine Moulay Ramdane.
[toc] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-05-30 18:38 -0500 |
| Message-ID | <jq67ib$612$1@dont-email.me> |
| In reply to | #906 |
I wrote: >I have modified parallelhashlist to use 128 locks I mean 128 lightweight MREWs (multiple-readers -exclusive-writer). Thank you. Amine Moulay Ramdane. "aminer" <aminer@videotron.ca> wrote in message news:jq67al$4i9$1@dont-email.me... > > Hello all, > > > I have updated parallelhashlist to version 1.41.. > > > I have modified parallelhashlist to use 128 locks, but you > have to use a hashsize in power of 2 and greater to 1000, > how do you pass a hashsize in power of 2 to the constructor? > by using shl operation like this > > > trait:=TCaseinsensitiveTraits.create;; > hash1:=TParallelHashList.create(trait,1 shl 25); > > > Why do you have to use a power of 2 ? > > > Please read this: > > > Power-of-Two Hash Table Size > > > "Any data structures 101 book will say choose a prime for the > number of buckets, so that the bucket's index can easily be computed > by h(k) = k mod m, where k is the key value and m is the bucket size. > While this approach is straight-forward, there are a number of issues > with it, including slow modulo performance. ConcurrentHashMap instead > uses a power-of-two rule" > > http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html > > > > I am using modulo functions inside parallelhashlist, and using a number of > locks > in power of 2, so you have to use hashsize in power of 2 , this will make > the > modulo function of the delphi and freepascal compilers 10X faster. > > > You can download parallelhashlist version 1.41 from: > > http://pages.videotron.com/aminer/ > > > > > Thank you. > > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-05-30 18:46 -0500 |
| Message-ID | <jq680p$8jp$1@dont-email.me> |
| In reply to | #906 |
I wrote: >I am using modulo functions inside parallelhashlist, and using a number of >locks in power of 2, so you have to use hashsize in power of 2 , this will >make the modulo function of the delphi and freepascal compilers 10X faster. I mean that the modulo function that i am using a lot inside parallelhashlist is 10X faster when the hashsize is power of 2 than when it's not power of 2. Thank you. Amine Moulay Ramdane. "aminer" <aminer@videotron.ca> wrote in message news:jq67al$4i9$1@dont-email.me... > > Hello all, > > > I have updated parallelhashlist to version 1.41.. > > > I have modified parallelhashlist to use 128 locks, but you > have to use a hashsize in power of 2 and greater to 1000, > how do you pass a hashsize in power of 2 to the constructor? > by using shl operation like this > > > trait:=TCaseinsensitiveTraits.create;; > hash1:=TParallelHashList.create(trait,1 shl 25); > > > Why do you have to use a power of 2 ? > > > Please read this: > > > Power-of-Two Hash Table Size > > > "Any data structures 101 book will say choose a prime for the > number of buckets, so that the bucket's index can easily be computed > by h(k) = k mod m, where k is the key value and m is the bucket size. > While this approach is straight-forward, there are a number of issues > with it, including slow modulo performance. ConcurrentHashMap instead > uses a power-of-two rule" > > http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html > > > > I am using modulo functions inside parallelhashlist, and using a number of > locks > in power of 2, so you have to use hashsize in power of 2 , this will make > the > modulo function of the delphi and freepascal compilers 10X faster. > > > You can download parallelhashlist version 1.41 from: > > http://pages.videotron.com/aminer/ > > > > > Thank you. > > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-06-02 18:38 -0500 |
| Message-ID | <jqe4lc$sf9$1@dont-email.me> |
| In reply to | #906 |
Hello, I have done some scalability tests on parallelhashlist 1.41 on an Intel Core 2 Quad Q6600.. Using 4 threads on 4 cores using the find() method i had a perfect scale of 4X . Using 4 threads on 4 cores using the Add() method i scaled 3.4X Regards, Amine Moulay Ramdane. . "aminer" <aminer@videotron.ca> wrote in message news:jq67al$4i9$1@dont-email.me... > > Hello all, > > > I have updated parallelhashlist to version 1.41.. > > > I have modified parallelhashlist to use 128 locks, but you > have to use a hashsize in power of 2 and greater to 1000, > how do you pass a hashsize in power of 2 to the constructor? > by using shl operation like this > > > trait:=TCaseinsensitiveTraits.create;; > hash1:=TParallelHashList.create(trait,1 shl 25); > > > Why do you have to use a power of 2 ? > > > Please read this: > > > Power-of-Two Hash Table Size > > > "Any data structures 101 book will say choose a prime for the > number of buckets, so that the bucket's index can easily be computed > by h(k) = k mod m, where k is the key value and m is the bucket size. > While this approach is straight-forward, there are a number of issues > with it, including slow modulo performance. ConcurrentHashMap instead > uses a power-of-two rule" > > http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html > > > > I am using modulo functions inside parallelhashlist, and using a number of > locks > in power of 2, so you have to use hashsize in power of 2 , this will make > the > modulo function of the delphi and freepascal compilers 10X faster. > > > You can download parallelhashlist version 1.41 from: > > http://pages.videotron.com/aminer/ > > > > > Thank you. > > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-06-02 18:52 -0500 |
| Message-ID | <jqe5ga$ts$1@dont-email.me> |
| In reply to | #910 |
Hello, I have done those tests to show some numbers... But the scalability of parallelhashlist does depend on the data keys that are presented to parallelhashlist, when the data keys are hashed and are very well distributed across the segments, in fact you can get a perfect 4X scaling both on reads and writes. Thank you. Amine Moulay Ramdane. "aminer" <aminer@videotron.ca> wrote in message news:jqe4lc$sf9$1@dont-email.me... > > > Hello, > > > I have done some scalability tests on parallelhashlist 1.41 > on an Intel Core 2 Quad Q6600.. > > Using 4 threads on 4 cores using the find() method i had a perfect scale > of 4X . > > Using 4 threads on 4 cores using the Add() method i scaled 3.4X > > > > Regards, > Amine Moulay Ramdane. > > > > . > > > > > > > > > > > "aminer" <aminer@videotron.ca> wrote in message > news:jq67al$4i9$1@dont-email.me... >> >> Hello all, >> >> >> I have updated parallelhashlist to version 1.41.. >> >> >> I have modified parallelhashlist to use 128 locks, but you >> have to use a hashsize in power of 2 and greater to 1000, >> how do you pass a hashsize in power of 2 to the constructor? >> by using shl operation like this >> >> >> trait:=TCaseinsensitiveTraits.create;; >> hash1:=TParallelHashList.create(trait,1 shl 25); >> >> >> Why do you have to use a power of 2 ? >> >> >> Please read this: >> >> >> Power-of-Two Hash Table Size >> >> >> "Any data structures 101 book will say choose a prime for the >> number of buckets, so that the bucket's index can easily be computed >> by h(k) = k mod m, where k is the key value and m is the bucket size. >> While this approach is straight-forward, there are a number of issues >> with it, including slow modulo performance. ConcurrentHashMap instead >> uses a power-of-two rule" >> >> http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html >> >> >> >> I am using modulo functions inside parallelhashlist, and using a number >> of locks >> in power of 2, so you have to use hashsize in power of 2 , this will >> make the >> modulo function of the delphi and freepascal compilers 10X faster. >> >> >> You can download parallelhashlist version 1.41 from: >> >> http://pages.videotron.com/aminer/ >> >> >> >> >> Thank you. >> >> Amine Moulay Ramdane. >> >> >> >> > >
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-06-02 18:56 -0500 |
| Message-ID | <jqe5na$27c$1@dont-email.me> |
| In reply to | #912 |
I write: >But the scalability of parallelhashlist does depend on the data keys that >are presented to parallelhashlist, when the data keys are hashed and are >very well distributed across the segments, in fact you can get a perfect 4X >scaling both on reads and writes. I mean a perfect scaling on 4 cores... Regards, Amine Moulay Ramdane. "aminer" <aminer@videotron.ca> wrote in message news:jqe5ga$ts$1@dont-email.me... > Hello, > > > I have done those tests to show some numbers... > > But the scalability of parallelhashlist does depend on the data keys > that are presented to parallelhashlist, when the data keys are hashed > and are very well distributed across the segments, in fact you can > get a perfect 4X scaling both on reads and writes. > > > > Thank you. > > Amine Moulay Ramdane. > > > "aminer" <aminer@videotron.ca> wrote in message > news:jqe4lc$sf9$1@dont-email.me... >> >> >> Hello, >> >> >> I have done some scalability tests on parallelhashlist 1.41 >> on an Intel Core 2 Quad Q6600.. >> >> Using 4 threads on 4 cores using the find() method i had a perfect scale >> of 4X . >> >> Using 4 threads on 4 cores using the Add() method i scaled 3.4X >> >> >> >> Regards, >> Amine Moulay Ramdane. >> >> >> >> . >> >> >> >> >> >> >> >> >> >> >> "aminer" <aminer@videotron.ca> wrote in message >> news:jq67al$4i9$1@dont-email.me... >>> >>> Hello all, >>> >>> >>> I have updated parallelhashlist to version 1.41.. >>> >>> >>> I have modified parallelhashlist to use 128 locks, but you >>> have to use a hashsize in power of 2 and greater to 1000, >>> how do you pass a hashsize in power of 2 to the constructor? >>> by using shl operation like this >>> >>> >>> trait:=TCaseinsensitiveTraits.create;; >>> hash1:=TParallelHashList.create(trait,1 shl 25); >>> >>> >>> Why do you have to use a power of 2 ? >>> >>> >>> Please read this: >>> >>> >>> Power-of-Two Hash Table Size >>> >>> >>> "Any data structures 101 book will say choose a prime for the >>> number of buckets, so that the bucket's index can easily be computed >>> by h(k) = k mod m, where k is the key value and m is the bucket size. >>> While this approach is straight-forward, there are a number of issues >>> with it, including slow modulo performance. ConcurrentHashMap instead >>> uses a power-of-two rule" >>> >>> http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html >>> >>> >>> >>> I am using modulo functions inside parallelhashlist, and using a number >>> of locks >>> in power of 2, so you have to use hashsize in power of 2 , this will >>> make the >>> modulo function of the delphi and freepascal compilers 10X faster. >>> >>> >>> You can download parallelhashlist version 1.41 from: >>> >>> http://pages.videotron.com/aminer/ >>> >>> >>> >>> >>> Thank you. >>> >>> Amine Moulay Ramdane. >>> >>> >>> >>> >> >> > >
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-06-02 18:40 -0500 |
| Message-ID | <jqe4on$t2h$1@dont-email.me> |
| In reply to | #906 |
Hello, I have done some scalability tests on parallelhashlist 1.41 on an Intel Core 2 Quad Q6600.. Using 4 threads on 4 cores using the find() method i had a perfect scaling of 4X . Using 4 threads on 4 cores using the Add() method i had a scaling of 3.4X Regards, Amine Moulay Ramdane. "aminer" <aminer@videotron.ca> wrote in message news:jq67al$4i9$1@dont-email.me... > > Hello all, > > > I have updated parallelhashlist to version 1.41.. > > > I have modified parallelhashlist to use 128 locks, but you > have to use a hashsize in power of 2 and greater to 1000, > how do you pass a hashsize in power of 2 to the constructor? > by using shl operation like this > > > trait:=TCaseinsensitiveTraits.create;; > hash1:=TParallelHashList.create(trait,1 shl 25); > > > Why do you have to use a power of 2 ? > > > Please read this: > > > Power-of-Two Hash Table Size > > > "Any data structures 101 book will say choose a prime for the > number of buckets, so that the bucket's index can easily be computed > by h(k) = k mod m, where k is the key value and m is the bucket size. > While this approach is straight-forward, there are a number of issues > with it, including slow modulo performance. ConcurrentHashMap instead > uses a power-of-two rule" > > http://work.tinou.com/2008/09/performance-optimization-in-concurrenthashmap.html > > > > I am using modulo functions inside parallelhashlist, and using a number of > locks > in power of 2, so you have to use hashsize in power of 2 , this will make > the > modulo function of the delphi and freepascal compilers 10X faster. > > > You can download parallelhashlist version 1.41 from: > > http://pages.videotron.com/aminer/ > > > > > Thank you. > > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming.threads
csiph-web