[erlang-questions] pid to integer and back

Hynek Vychodil <>
Wed Oct 8 18:14:05 CEST 2008


And what about term_to_binary?

On Wed, Oct 8, 2008 at 6:01 PM, Joel Reymont <> wrote:

> Is there a safe and efficient way to convert pid to integer and back?
>
> I'm assigning each running poker game an integer id. I store this id
> into every outgoing packet so there's no database lookup.
>
> I use the id to lookup the game process for every incoming packet,
> though. This is proving to be extremely inefficient, even with dirty
> mnesia reads.
>
> I actually repeat the above for every player, so there's twice the
> overhead. Is there a way to avoid it?
>
> This would only apply to running games and connected players so this
> would be a temporary integer, valid while the process is alive.
>
>        Thanks, Joel
>
> --
> wagerlabs.com
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



-- 
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081008/4f4aab32/attachment.html>


More information about the erlang-questions mailing list