Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #2080 > unrolled thread
| Started by | "aminer" <aminer@videotron.ca> |
|---|---|
| First post | 2012-08-17 17:28 -0500 |
| Last post | 2012-08-21 12:21 -0500 |
| Articles | 10 — 2 participants |
Back to article view | Back to comp.programming
Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-17 17:28 -0500
Re: Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-17 17:54 -0500
Re: Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-17 18:01 -0500
Re: Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-18 00:31 -0500
Re: Parallel Quicksort 1.0 here... Gerald Breuer <Gerald.Breuer@googlemail.com> - 2012-08-18 10:19 +0200
Re: Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-18 09:57 -0500
Re: Parallel Quicksort 1.0 here... Gerald Breuer <Gerald.Breuer@googlemail.com> - 2012-08-18 19:52 +0200
Re: Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-18 14:20 -0500
Re: Parallel Quicksort 1.0 here... Gerald Breuer <Gerald.Breuer@googlemail.com> - 2012-08-18 22:58 +0200
Re: Parallel Quicksort 1.0 here... "aminer" <aminer@videotron.ca> - 2012-08-21 12:21 -0500
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-17 17:28 -0500 |
| Subject | Parallel Quicksort 1.0 here... |
| Message-ID | <k0md2b$dhh$1@dont-email.me> |
Hello, Parallel Quicksort 1.0 is here. Description: Parallel Quicksort that uses my threadpool engine. Parallel Quicksort gave me 3x scaling when sorting strings on a quad cores, it scales better than the parallel quicksort in the parallelsort library.. Please use Lazarus-1.1-38262-fpc-2.6.1 from http://mirrors.iwi.me/lazarus/snapshots / cause it scales better on this version. Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/ or Lazarus 32 bits or 64 bits from: http://mirrors.iwi.me/lazarus/snapshots/ Operating Systems: Win , Linux and Mac (x86). You can download parallelquicksort from: http://pages.videotron.com/aminer/ Thank you, Amine Moulay Ramdane.
[toc] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-17 17:54 -0500 |
| Message-ID | <k0meue$m2k$1@dont-email.me> |
| In reply to | #2080 |
Hello,
It is easy to use parallel quicksort , you can sort strings , integers ,
reals, doubles etc
you can sort even sort then when they are inside objects.
Here is an example that i gave you inside the zip file, i am sorting strings
that are inside objects:
:
---
program test;
uses parallelquicksort,sysutils,timer;
type
TStudent = Class
public
Name: string;
end;
?
var tab:Ttabpointer;
myobj:TParallelSort;
student:TStudent;
i:integer;
function comp(Item1, Item2: Pointer): integer;
begin
if TStudent(Item1).name < TStudent(Item2).name
then
begin
result:=-1;
exit;
end;
if TStudent(Item1).name > TStudent(Item2).name
then
begin
result:=1;
exit;
end;
if TStudent(Item1).name = TStudent(Item2).name
then
begin
result:=0;
exit;
end;
?
end;
begin
myobj:=TParallelSort.create(1); // set to the number of cores...
setlength(tab,100000);
for i:=low(tab) to high(tab)
do
begin
student:=TStudent.create;
student.name:= inttostr(i);
tab[high(tab)-i]:= student;
end;
?
HPT.Timestart;
myobj.pqsort(tab,comp);
writeln;
writeln('Time in microseconds: ',hpt.TimePeriod);
?
writeln;
writeln('Please press a key to continu...');
readln;
for i := LOW(tab) to HIGH(Tab)
do
begin
writeln(TStudent(tab[i]).name,' ');
end;
for i := 0 to HIGH(Tab) do freeandnil(TStudent(tab[i]));
setlength(tab,0);
myobj.free;
end.
---
Thank you,
Amine Moulay Ramdane.
"aminer" <aminer@videotron.ca> wrote in message
news:k0md2b$dhh$1@dont-email.me...
>
> Hello,
>
> Parallel Quicksort 1.0 is here.
>
>
> Description:
>
> Parallel Quicksort that uses my threadpool engine.
>
> Parallel Quicksort gave me 3x scaling when sorting strings on a quad
> cores, it scales better than the parallel quicksort in the parallelsort
> library..
>
> Please use Lazarus-1.1-38262-fpc-2.6.1 from
> http://mirrors.iwi.me/lazarus/snapshots / cause it scales better on this
> version.
>
> Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/
>
> or Lazarus 32 bits or 64 bits from:
>
> http://mirrors.iwi.me/lazarus/snapshots/
>
> Operating Systems: Win , Linux and Mac (x86).
>
>
> You can download parallelquicksort from:
>
> http://pages.videotron.com/aminer/
>
>
>
> Thank you,
> Amine Moulay Ramdane.
>
>
>
>
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-17 18:01 -0500 |
| Message-ID | <k0mf0e$ngg$5@dont-email.me> |
| In reply to | #2081 |
I wrote:
>It is easy to use parallel quicksort , you can sort strings , integers ,
>reals, doubles etc
>you can sort even sort then when they are inside objects.
Sorry for the typo, i mean you can even sort them when they are inside
objects.
Thank you,
Amine Moulay Ramdane.
"aminer" <aminer@videotron.ca> wrote in message
news:k0meue$m2k$1@dont-email.me...
> Hello,
>
> It is easy to use parallel quicksort , you can sort strings , integers ,
> reals, doubles etc
> you can sort even sort then when they are inside objects.
>
> Here is an example that i gave you inside the zip file, i am sorting
> strings that are inside objects:
>
> :
> ---
>
> program test;
>
> uses parallelquicksort,sysutils,timer;
>
> type
>
> TStudent = Class
> public
> Name: string;
> end;
> ?
> var tab:Ttabpointer;
> myobj:TParallelSort;
> student:TStudent;
> i:integer;
>
>
> function comp(Item1, Item2: Pointer): integer;
>
> begin
>
> if TStudent(Item1).name < TStudent(Item2).name
> then
> begin
> result:=-1;
> exit;
> end;
>
> if TStudent(Item1).name > TStudent(Item2).name
> then
> begin
> result:=1;
> exit;
> end;
>
> if TStudent(Item1).name = TStudent(Item2).name
> then
> begin
> result:=0;
> exit;
> end;
> ?
> end;
>
> begin
>
> myobj:=TParallelSort.create(1); // set to the number of cores...
>
> setlength(tab,100000);
>
> for i:=low(tab) to high(tab)
> do
> begin
> student:=TStudent.create;
> student.name:= inttostr(i);
> tab[high(tab)-i]:= student;
> end;
> ?
> HPT.Timestart;
>
> myobj.pqsort(tab,comp);
>
> writeln;
> writeln('Time in microseconds: ',hpt.TimePeriod);
> ?
> writeln;
>
> writeln('Please press a key to continu...');
>
> readln;
>
> for i := LOW(tab) to HIGH(Tab)
> do
> begin
> writeln(TStudent(tab[i]).name,' ');
> end;
>
> for i := 0 to HIGH(Tab) do freeandnil(TStudent(tab[i]));
> setlength(tab,0);
> myobj.free;
>
> end.
>
> ---
>
>
> Thank you,
> Amine Moulay Ramdane.
>
>
> "aminer" <aminer@videotron.ca> wrote in message
> news:k0md2b$dhh$1@dont-email.me...
>>
>> Hello,
>>
>> Parallel Quicksort 1.0 is here.
>>
>>
>> Description:
>>
>> Parallel Quicksort that uses my threadpool engine.
>>
>> Parallel Quicksort gave me 3x scaling when sorting strings on a quad
>> cores, it scales better than the parallel quicksort in the parallelsort
>> library..
>>
>> Please use Lazarus-1.1-38262-fpc-2.6.1 from
>> http://mirrors.iwi.me/lazarus/snapshots / cause it scales better on this
>> version.
>>
>> Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/
>>
>> or Lazarus 32 bits or 64 bits from:
>>
>> http://mirrors.iwi.me/lazarus/snapshots/
>>
>> Operating Systems: Win , Linux and Mac (x86).
>>
>>
>> You can download parallelquicksort from:
>>
>> http://pages.videotron.com/aminer/
>>
>>
>>
>> Thank you,
>> Amine Moulay Ramdane.
>>
>>
>>
>>
>
>
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-18 00:31 -0500 |
| Message-ID | <k0n5r4$4n0$2@dont-email.me> |
| In reply to | #2080 |
Hello, I have updated parallel quicksort to version 1.01 You can download it from: http://pages.videotron.com/aminer/ Thank you, Amine Moulay Ramdane. "aminer" <aminer@videotron.ca> wrote in message news:k0md2b$dhh$1@dont-email.me... > > Hello, > > Parallel Quicksort 1.0 is here. > > > Description: > > Parallel Quicksort that uses my threadpool engine. > > Parallel Quicksort gave me 3x scaling when sorting strings on a quad > cores, it scales better than the parallel quicksort in the parallelsort > library.. > > Please use Lazarus-1.1-38262-fpc-2.6.1 from > http://mirrors.iwi.me/lazarus/snapshots / cause it scales better on this > version. > > Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/ > > or Lazarus 32 bits or 64 bits from: > > http://mirrors.iwi.me/lazarus/snapshots/ > > Operating Systems: Win , Linux and Mac (x86). > > > You can download parallelquicksort from: > > http://pages.videotron.com/aminer/ > > > > Thank you, > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [next] | [standalone]
| From | Gerald Breuer <Gerald.Breuer@googlemail.com> |
|---|---|
| Date | 2012-08-18 10:19 +0200 |
| Message-ID | <k0nj7d$3id$1@speranza.aioe.org> |
| In reply to | #2080 |
Dude, learn C or C++. No one wants to have Pascal-code.
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-18 09:57 -0500 |
| Message-ID | <k0o713$qcv$2@dont-email.me> |
| In reply to | #2080 |
Hello, I have updated parallelquicksort to version 1.02, what have changed ? In the constructor i have set the number of item for each queue to 2^12 to use less memory, before it was set to 2^15. TP := TThreadPool.Create(nbrprocessors, 12, TMyThread); nbrprocs workers threads and 2^15 items for each queue. You can download parallelquicksort from: http://pages.videotron.com/aminer/ Thank you, Amine Moulay Ramdane "aminer" <aminer@videotron.ca> wrote in message news:k0md2b$dhh$1@dont-email.me... > > Hello, > > Parallel Quicksort 1.0 is here. > > > Description: > > Parallel Quicksort that uses my threadpool engine. > > Parallel Quicksort gave me 3x scaling when sorting strings on a quad > cores, it scales better than the parallel quicksort in the parallelsort > library.. > > Please use Lazarus-1.1-38262-fpc-2.6.1 from > http://mirrors.iwi.me/lazarus/snapshots / cause it scales better on this > version. > > Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/ > > or Lazarus 32 bits or 64 bits from: > > http://mirrors.iwi.me/lazarus/snapshots/ > > Operating Systems: Win , Linux and Mac (x86). > > > You can download parallelquicksort from: > > http://pages.videotron.com/aminer/ > > > > Thank you, > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [next] | [standalone]
| From | Gerald Breuer <Gerald.Breuer@googlemail.com> |
|---|---|
| Date | 2012-08-18 19:52 +0200 |
| Message-ID | <k0okq0$n4b$1@speranza.aioe.org> |
| In reply to | #2087 |
Hey dude, Pascal is an almost dead language. Dont't want to change?
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-18 14:20 -0500 |
| Message-ID | <k0omeh$l4b$2@dont-email.me> |
| In reply to | #2088 |
Hello, Object pascal is not dead. Read this: "Oxygene is a Next Generation Object Pascal language development environment for creating managed applications for the Common Language Runtime - including Microsoft .NET and Novell's open source Mono framework - and the Java Runtime Environment - including regular Java and Android". http://www.remobjects.com/oxygene/ http://wiki.oxygenelanguage.com/en/Delphi_vs._Oxygene and Lazarus for multiple OSs and multiple architechtures for both 32 bits and 64 bit architechitures: http://www.lazarus.freepascal.org/ and "Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal compiler. It can target multiple processor architectures: Intel x86, AMD64/x86-64, PowerPC, PowerPC64, SPARC, and ARM. Supported operating systems include Linux, FreeBSD, Haiku, Mac OS X/iOS/Darwin, DOS, Win32, Win64, WinCE, OS/2, MorphOS, Nintendo GBA, Nintendo DS, and Nintendo Wii." http://www.freepascal.org/ Thank you, Amine Moulay Ramdane. "Gerald Breuer" <Gerald.Breuer@googlemail.com> wrote in message news:k0okq0$n4b$1@speranza.aioe.org... > Hey dude, Pascal is an almost dead language. > Dont't want to change?
[toc] | [prev] | [next] | [standalone]
| From | Gerald Breuer <Gerald.Breuer@googlemail.com> |
|---|---|
| Date | 2012-08-18 22:58 +0200 |
| Message-ID | <k0ovms$gls$1@speranza.aioe.org> |
| In reply to | #2089 |
Am 18.08.2012 21:20, schrieb aminer: > Hello, > Object pascal is not dead. Ok, it's almost dead: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html "13 Delphi/Object Pascal 1.012% ..."
[toc] | [prev] | [next] | [standalone]
| From | "aminer" <aminer@videotron.ca> |
|---|---|
| Date | 2012-08-21 12:21 -0500 |
| Message-ID | <k10cij$1je$1@dont-email.me> |
| In reply to | #2080 |
Hello, I have updated parallelquicksort to version 1.03 You can download parallelquicksort from: http://pages.videotron.com/aminer/ Thank you, Amine Moulay Ramdane "aminer" <aminer@videotron.ca> wrote in message news:k0md2b$dhh$1@dont-email.me... > > Hello, > > Parallel Quicksort 1.0 is here. > > > Description: > > Parallel Quicksort that uses my threadpool engine. > > Parallel Quicksort gave me 3x scaling when sorting strings on a quad > cores, it scales better than the parallel quicksort in the parallelsort > library.. > > Please use Lazarus-1.1-38262-fpc-2.6.1 from > http://mirrors.iwi.me/lazarus/snapshots / cause it scales better on this > version. > > Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/ > > or Lazarus 32 bits or 64 bits from: > > http://mirrors.iwi.me/lazarus/snapshots/ > > Operating Systems: Win , Linux and Mac (x86). > > > You can download parallelquicksort from: > > http://pages.videotron.com/aminer/ > > > > Thank you, > Amine Moulay Ramdane. > > > >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming
csiph-web