TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lua as a Python’s secret weapon

74 pointsby ceyhunkazelover 8 years ago

6 comments

travisoliphantover 8 years ago
Lua is indeed a pretty nice language for some use-cases and it&#x27;s nice to see this example. It would also be great to see a comparison to Numba which is a Python JIT particularly suited for fast numerical computing with Python: <a href="http:&#x2F;&#x2F;numba.pydata.org" rel="nofollow">http:&#x2F;&#x2F;numba.pydata.org</a><p>Numba provides speed-ups over NumPy and Python and does so in way very easy for Python programmers to use with decorators on Python functions. Numba can be used to easily build new &quot;ufuncs&quot; which are NumPy&#x27;s universal functions and it has multiple interfaces for programming the GPU directly from Python for even higher performance.
magicbuzzover 8 years ago
Lua is amazing. I&#x27;ve used it to reimplement an API served by Python and it was consistently twice as fast i.e. half the time to serve a request compared to the Python framework in basically the same code.
评论 #13066427 未加载
andrewmcwattersover 8 years ago
Or you know, just use Lua.
评论 #13066485 未加载
wiz21cover 8 years ago
As anyone experience with adding new types to Lua ? I mean, in a fundamental type, not just simulating them with regular Lua features. For example, adding a 128 bit float number ?
评论 #13066483 未加载
kayamonover 8 years ago
I suspect that this is not using stock Lua, but LuaJIT instead. Stock Lua wouldn&#x27;t be much different than Python itself.<p>The real gains come from Mike Pall&#x27;s amazing JIT implementation, not the language itself.
评论 #13068336 未加载
评论 #13069936 未加载
评论 #13070302 未加载
Chris2048over 8 years ago
Can&#x27;t you achieve the same by embedding, say, rust?
评论 #13073485 未加载