[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What to do for faster `remove-duplicates'?
From: |
Oleh Krehel |
Subject: |
Re: What to do for faster `remove-duplicates'? |
Date: |
Wed, 06 May 2015 16:13:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Artur Malabarba <address@hidden> writes:
>> I attach the patch. I did a bunch of `benchmark-run' and it seems that
>> 100 elements is the breaking point.
>
> Small question. How much slower is this patch compared to the current
> version on a list of 99 elements? (Due to having to calculate the
> length)
For 99 unique candidates, the call to `length' takes 5% time compared to
the call to `delete-dups':
(/ 3.774e-06 6.3028e-05)
0.05987814939392017
It becomes worse for a small amount of unique candidates, going to 30%
for 10 candidates, but a lot of that is the standard cost of calling a
function.
I don't know if it's worth optimizing further.
Oleh
- Re: What to do for faster `remove-duplicates'?, (continued)
- Re: What to do for faster `remove-duplicates'?, Artur Malabarba, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Oleh Krehel, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Artur Malabarba, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Oleh Krehel, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Artur Malabarba, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Thierry Volpiatto, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Stefan Monnier, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Stefan Monnier, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Artur Malabarba, 2015/05/06
- Re: What to do for faster `remove-duplicates'?, Artur Malabarba, 2015/05/06
- Re: What to do for faster `remove-duplicates'?,
Oleh Krehel <=
- Re: What to do for faster `remove-duplicates'?, Artur Malabarba, 2015/05/06