iopipe v0.0.4 - RingBuffers!

Steven Schveighoffer schveiguy at yahoo.com
Sat May 12 12:14:28 UTC 2018


On 5/11/18 5:42 PM, Joakim wrote:
> On Friday, 11 May 2018 at 16:07:26 UTC, Steven Schveighoffer wrote:
>> On 5/11/18 11:44 AM, Steven Schveighoffer wrote:
>>> On 5/10/18 7:22 PM, Steven Schveighoffer wrote:
>>>
>>>> [...]
>>>
>>> Shameful note: Macos grep is BSD grep, and is not NEARLY as fast as 
>>> GNU grep, which has much better performance (and is 2x as fast as 
>>> iopipe_search on my Linux VM, even when printing line numbers).
>>>
>>> So at least there is something to strive for :)
>>
>> More testing reveals that as I increase the context lines to print, 
>> iopipe performs better than GNU grep. A shocking thing is that at 9 
>> lines of context, grep goes up slightly, but all of a sudden at 10 
>> lines of context, it doubles in the time taken (and is now slower than 
>> the iopipe_search).
>>
>> Also noting: my Linux VM does not have ldc, so these are dmd numbers.
>>
> 
> What stops you from downloading a linux release from here?
> 
> https://github.com/ldc-developers/ldc/releases

So I did that, it's not much faster, a few milliseconds. Still about 
half as fast as GNU grep.

But I am not expecting any miracles here. GNU grep does pretty much 
everything it can to achieve performance -- including eschewing the 
standard library buffering system as I am doing. I can probably match 
the performance at some point, but I doubt it's worth worrying about. 
It's still really really fast without trying to do anything crazy.

I hope at some point, however, to work with Dmitry to add iopipe-based 
regex engine so we can see how much better we can make regex.

-Steve


More information about the Digitalmars-d-announce mailing list