Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development Topics
- Intel® Moderncode for Parallel Architectures
- Parallelhashlist was updated to version 1.41 ...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

aminer10

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-30-2012
03:33 PM

56 Views

Parallelhashlist was updated to version 1.41 ...

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 inpower 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 of2 ?

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 usingmodulo functions inside parallelhashlist, and using a number of locks

in power of 2, so you have to usehashsize in power of 2 , this will make the

modulo function ofthe delphi and freepascal compilers10X faster.

You can download parallelhashlist version 1.41 from:

http://pages.videotron.com/aminer/

Thank you.

Amine Moulay Ramdane.

Link Copied

5 Replies

aminer10

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-30-2012
03:38 PM

56 Views

I wrote:

>I have modified parallelhashlist to use 128 locks

I mean 128 lightweight MREWs (multiple-readers -exclusive-writer).

Thank you.

Amine Moulay Ramdane.

aminer10

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-30-2012
03:46 PM

56 Views

I wrote:

>I am usingmodulo functions inside parallelhashlist, and using a number of locks

>in power of 2, so you have to usehashsize in power of 2 , this will make the

>modulo function ofthe delphi and freepascal compilers10X 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.

aminer10

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-02-2012
03:40 PM

56 Views

Hello,

I have done some scalability tests on parallelhashlist 1.41

on an Intel Core 2 Quad Q6600..

Using 4 threads on4 coresusing the find() method i had a perfect scaling of 4X .

Using4 threads on4 coresusing the Add() methodihad a scaling of 3.4X

Regards,

Amine Moulay Ramdane.

aminer10

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-02-2012
03:52 PM

56 Views

Hello,

I have done those tests to show some numbers...

But the scalability of parallelhashlist does depend onthe data keys

that are presentedto parallelhashlist,when the data keys are hashed

and are very well distributedacrossthe segments, in fact you can

get a perfect 4X scaling both on reads and writes.

Thank you.

Amine Moulay Ramdane.

aminer10

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-02-2012
03:58 PM

56 Views

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.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.