[zeromq-dev] New faster 0MQ bindings for Lua & LuaJIT2
Pieter Hintjens
ph at imatix.com
Sat Feb 26 09:57:27 CET 2011
Robert, 6M msg/second from Lua, up from 1.3M/sec! Very nice indeed.
Feel free to update http://www.zeromq.org/bindings:lua.
I'd advise you also to put these performance results into your README,
so it's clear to visitors to the project why they want it.
-Pieter
On Sat, Feb 26, 2011 at 9:45 AM, Robert G. Jakabosky
<bobby at sharedrealm.com> wrote:
>
> Here has been a lot of talk on the Lua mailing list about a new feature in
> LuaJIT2 called FFI (foreign function interface). The new FFI feature greatly
> improves the performance of Lua code when running under LuaJIT2, but it
> doesn't work under the standard Lua VM. So I have create a hybrid Lua module
> [1] that has normal C bindings and FFI-based bindings for 0MQ.
>
> Also the new bindings have support for sending/receving messages using the
> zmq_msg_t structure. This improves the performance even more under LuaJIT2
> and gets the throughput to almost equal that of the C++ benchmark.
>
> Throughput benchmark using the tcp transport over localhost:
> message size: 30 [B]
> message count: 100000000
>
> Orignal Lua bindings running under Lua 5.1.4:
> mean throughput: 1395864 [msg/s]
> mean throughput: 335.007 [Mb/s]
>
> New bindings running under Lua 5.1.4:
> mean throughput: 1577407 [msg/s]
> mean throughput: 378.578 [Mb/s]
>
> Orignal Lua bindings running under LuaJIT2 (git HEAD):
> mean throughput: 2516850 [msg/s]
> mean throughput: 604.044 [Mb/s]
>
> New bindings running under LuaJIT2 (git HEAD):
> mean throughput: 5112158 [msg/s]
> mean throughput: 1226.918 [Mb/s]
>
> New bindings using send_msg/recv_msg functions running under LuaJIT2 (git
> HEAD):
> mean throughput: 6160911 [msg/s]
> mean throughput: 1478.619 [Mb/s]
>
> C++ code:
> mean throughput: 6241452 [msg/s]
> mean throughput: 1497.948 [Mb/s]
>
>
> 1. https://github.com/Neopallium/lua-zmq
>
> --
> Robert G. Jakabosky
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
More information about the zeromq-dev
mailing list