On 05/08/2015 10:22 AM, John Snow wrote:
>>> I'm a bit surprised - making a function call per byte generally executes
>>> more instructions than open-coding the conversion (albeit the branch
>>> prediction in the hardware probably does fairly well over long strings,
>>> since it is a tight and pred
On 05/08/2015 02:25 AM, Markus Armbruster wrote:
> Eric Blake writes:
>
>> On 05/06/2015 10:18 AM, John Snow wrote:
>>
To find out, add just buffering. Something like this in your patch
instead of byte2hex():
for (i = 0; i < len; i++) {
-qtest_send
Eric Blake writes:
> On 05/06/2015 10:18 AM, John Snow wrote:
>
>>> To find out, add just buffering. Something like this in your patch
>>> instead of byte2hex():
>>>
>>> for (i = 0; i < len; i++) {
>>> -qtest_sendf(chr, "%02x", data[i]);
>>> +snprintf(&enc[i * 2]
On 05/06/2015 10:18 AM, John Snow wrote:
>> To find out, add just buffering. Something like this in your patch
>> instead of byte2hex():
>>
>> for (i = 0; i < len; i++) {
>> -qtest_sendf(chr, "%02x", data[i]);
>> +snprintf(&enc[i * 2], 2, "%02x", data[i]);
>>
On 05/07/2015 02:13 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> On 05/06/2015 11:19 AM, Markus Armbruster wrote:
>>> John Snow writes:
>>>
On 05/06/2015 02:25 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> Instead of letting printf and friends do this for us
John Snow writes:
> On 05/06/2015 11:19 AM, Markus Armbruster wrote:
>> John Snow writes:
>>
>>> On 05/06/2015 02:25 AM, Markus Armbruster wrote:
John Snow writes:
> Instead of letting printf and friends do this for us
> one byte at a time, fill a buffer ourselves and then
>>
On 05/06/2015 11:19 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> On 05/06/2015 02:25 AM, Markus Armbruster wrote:
>>> John Snow writes:
>>>
Instead of letting printf and friends do this for us
one byte at a time, fill a buffer ourselves and then
send the entire buffer i
John Snow writes:
> On 05/06/2015 02:25 AM, Markus Armbruster wrote:
>> John Snow writes:
>>
>>> Instead of letting printf and friends do this for us
>>> one byte at a time, fill a buffer ourselves and then
>>> send the entire buffer in one go.
>>>
>>> This gives a moderate speed improvement ov
On 05/06/2015 02:25 AM, Markus Armbruster wrote:
> John Snow writes:
>
>> Instead of letting printf and friends do this for us
>> one byte at a time, fill a buffer ourselves and then
>> send the entire buffer in one go.
>>
>> This gives a moderate speed improvement over the old
>> method.
>
>
John Snow writes:
> Instead of letting printf and friends do this for us
> one byte at a time, fill a buffer ourselves and then
> send the entire buffer in one go.
>
> This gives a moderate speed improvement over the old
> method.
Out of curiosity: how much of the improvement is due to doing our
Instead of letting printf and friends do this for us
one byte at a time, fill a buffer ourselves and then
send the entire buffer in one go.
This gives a moderate speed improvement over the old
method.
Signed-off-by: John Snow
---
qtest.c | 20
tests/libqtest.c | 17
11 matches
Mail list logo