[erlang-questions] Ordered set with lower_bound

Colm Dougan colm.dougan@REDACTED
Mon Oct 12 12:09:25 CEST 2009


On Fri, Oct 9, 2009 at 7:43 AM, Max Lapshin <max.lapshin@REDACTED> wrote:
> It seems, that I require the same functionality: list of frames is
> stored in memory and when user requests frame number N,
> I need the first keyframe, left to requested.
>
> They are stored in ets ordered set table (it becomes rather large), so
> I take all keyframes, left to requested and select first from them.
> Very, very non-optimal =(

If by "frame number N" you mean "the Nth object in the ordered set"
then you can use ets:slot for this

Colm


More information about the erlang-questions mailing list