[erlang-questions] Suffix array implementation in Erlang?
Robert Virding
rvirding@REDACTED
Sat Sep 4 16:33:33 CEST 2010
On 4 September 2010 13:29, zabrane Mikael <zabrane3@REDACTED> wrote:
> Hi Robert,
>
> 2010/9/4 Robert Virding <rvirding@REDACTED>:
>> Why do a NIF implementation?
>
> Performance ! There's a lot of rock solid C implementations out there.
>
>> Or don't you plan to use erlang data structures?
>
> Yep, but before reinventing the wheel, I'd like to know if a pure
> Erlang implementation exists.
Where I was trying (unsuccessfully) to go was that if you were going
to use normal erlang data structures (lists/tuples) to build the tree
and store general erlang terms in it then I would be surprised if you
can use destructive algorithms for the array as they work on the
normal Erlang heaps. In which case you might not be able to directly
use these C implementations. In which case it is probably easier to
work on the tree directly in Erlang instead of in C in a NIF, seeing
you have to modify the algorithms anyway.
I can't remember what it says about destructive operations on heap
data in the NIF docs.
Robert
More information about the erlang-questions
mailing list