Am Mon, 26 Oct 2015 14:04:18 +0100
schrieb Iain Buclaw via Digitalmars-d
:
> > Yeah but PMOVMSKB not implemented in core.simd.
> >
>
> Don't use core.simd, push for getting std.simd in, then leverage the
> generics exposed through that module.
Yeah, but PMOVMSKB is
On 10/28/2015 10:27 AM, Marco Leise wrote:
Am Mon, 26 Oct 2015 14:04:18 +0100
schrieb Iain Buclaw via Digitalmars-d
:
Yeah but PMOVMSKB not implemented in core.simd.
Don't use core.simd, push for getting std.simd in, then leverage the
generics exposed through
On Monday, 26 October 2015 at 11:10:31 UTC, Iakh wrote:
On Monday, 26 October 2015 at 09:49:00 UTC, Iakh wrote:
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
runBinary calls naiveIndexOf. You're not testing
binaryIndexOf.
You are right.
This is fixed example:
On 10/26/2015 05:48 AM, Iakh wrote:
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
runBinary calls naiveIndexOf. You're not testing binaryIndexOf.
You are right.
This is fixed example:
http://dpaste.dzfl.pl/f7a54b789a21
and results at dpaste.dzfl.pl:
-
SIMD:
On Monday, 26 October 2015 at 09:49:00 UTC, Iakh wrote:
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
runBinary calls naiveIndexOf. You're not testing binaryIndexOf.
You are right.
This is fixed example:
http://dpaste.dzfl.pl/f7a54b789a21
and results at dpaste.dzfl.pl:
-
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
runBinary calls naiveIndexOf. You're not testing binaryIndexOf.
You are right.
This is fixed example:
http://dpaste.dzfl.pl/f7a54b789a21
and results at dpaste.dzfl.pl:
-
SIMD: TickDuration(151000)
Binary: TickDuration(255000)
On Monday, 26 October 2015 at 12:35:39 UTC, Don wrote:
You need to be very careful with doing benchmarks on tiny test
cases, they can be very misleading.
Can you advice some reading about benchmark?
On Monday, 26 October 2015 at 12:10:41 UTC, rumbu wrote:
Interpolation search is even faster :)
http://dpaste.dzfl.pl/4443c5753454
For a funny name it's called Newton search: you can use
interpolation of higher order, can be more efficient if the data
has a trend.
On Monday, 26 October 2015 at 11:47:56 UTC, Andrei Alexandrescu
wrote:
On 10/26/2015 05:48 AM, Iakh wrote:
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
runBinary calls naiveIndexOf. You're not testing
binaryIndexOf.
You are right.
This is fixed example:
On 26 Oct 2015 1:40 pm, "Don via Digitalmars-d"
wrote:
>
> On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote:
>>
>> Here is my implementatation of SIMD find. Function returns index of
ubyte in static 16 byte array with unique values.
>
>
> [snip]
>
> You need to
On Monday, 26 October 2015 at 11:47:56 UTC, Andrei Alexandrescu
wrote:
On 10/26/2015 05:48 AM, Iakh wrote:
On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
runBinary calls naiveIndexOf. You're not testing
binaryIndexOf.
You are right.
This is fixed example:
On 25 Oct 2015 11:50 pm, "Iakh via Digitalmars-d" <
digitalmars-d@puremagic.com> wrote:
>
> On Sunday, 25 October 2015 at 22:17:58 UTC, Matthias Bentrup wrote:
>>
>> On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote:
>>>
>>> Is it optimal and how do you implement this stuf?
>>>
>>
>> I think
On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote:
Here is my implementatation of SIMD find. Function returns
index of ubyte in static 16 byte array with unique values.
[snip]
You need to be very careful with doing benchmarks on tiny test
cases, they can be very misleading.
Be aware
On 10/26/2015 08:35 AM, Don wrote:
On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote:
Here is my implementatation of SIMD find. Function returns index of
ubyte in static 16 byte array with unique values.
[snip]
You need to be very careful with doing benchmarks on tiny test cases,
they
On Monday, 26 October 2015 at 15:03:12 UTC, Iakh wrote:
(Binary)Searching in large sorted continuous array e. g. 1 MB
of bytes
1 MB = 2 ^^ 20 bytes
Imagine 4 binary levels pass in 4 ticks. So 20 levels in 20
ticks. With SIMD last 4 levels would be done in 2 or 3 ticks.
For 20 levels 18 - 19
On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote:
Is it optimal and how do you implement this stuf?
I think it's better to use PMOVMSKB to avoid storing the PCMPEQB
result in memory and you need only one BSF instruction.
On 25.10.2015 20:37, Iakh wrote:
Full exaple with comparation of algorithms (SIMD, naive, binary search):
http://dpaste.dzfl.pl/f3b8989841e3
From there:
void runBinary()
{
static int i = 0;
naiveIndexOf(cast(ubyte)(i++/ArraySize + 1), arr);
}
runBinary calls naiveIndexOf. You're not
On Sunday, 25 October 2015 at 22:17:58 UTC, Matthias Bentrup
wrote:
On Sunday, 25 October 2015 at 19:37:32 UTC, Iakh wrote:
Is it optimal and how do you implement this stuf?
I think it's better to use PMOVMSKB to avoid storing the
PCMPEQB result in memory and you need only one BSF
On 10/25/15 6:57 PM, Iakh wrote:
On Sunday, 25 October 2015 at 21:13:56 UTC, Andrei Alexandrescu wrote:
[...]
This is compelling but needs a bit of work to integrate. Care to work
on a PR that makes std.algorithm use it? Thanks! -- Andrei
First of all I need sort of investigation about PRs
On Sunday, 25 October 2015 at 21:13:56 UTC, Andrei Alexandrescu
wrote:
[...]
This is compelling but needs a bit of work to integrate. Care
to work on a PR that makes std.algorithm use it? Thanks! --
Andrei
First of all I need sort of investigation about PRs and
std.algorithm. But in general
On 10/25/2015 03:37 PM, Iakh wrote:
Here is my implementatation of SIMD find. Function returns index of
ubyte in static 16 byte array with unique values.
--
immutable size_t ArraySize = 16;
int simdIndexOf(ubyte niddle, ref const ubyte[ArraySize] haystack)
{
ubyte16 arr;
arr.array
Here is my implementatation of SIMD find. Function returns index
of ubyte in static 16 byte array with unique values.
--
immutable size_t ArraySize = 16;
int simdIndexOf(ubyte niddle, ref const ubyte[ArraySize] haystack)
{
ubyte16 arr;
arr.array = haystack[];
ubyte16 niddles;
22 matches
Mail list logo