Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Apt, Apache, and Lua

2»

Comments

  • Not_OlesNot_Oles Member, Patron Provider

    Please remember: no claim that any of this is correct.

    @Not_Oles said:

    LuaJIT is 285.63 times faster than Python

    Gemini said:

    LuaJIT is significantly faster than Python: This is a great demonstration of LuaJIT's performance benefits. LuaJIT is a just-in-time (JIT) compiler, which means it can compile the Lua code into optimized machine code on the fly, resulting in much faster execution than Python's interpreted approach.

    @Not_Oles said:

    C is 2.58 times faster than LuaJIT

    Gemini said:

    C is faster than LuaJIT: This is also expected, as C is a lower-level language with more direct control over hardware resources. Even with JIT compilation, LuaJIT typically has some overhead compared to native C code.


    @entrailz said: Their most recent outage mentions their usage of Lua here:

    https://blog.cloudflare.com/cloudflare-incident-on-june-20-2024

    See also https://blog.cloudflare.com/more-consistent-luajit-performance

  • Not_OlesNot_Oles Member, Patron Provider

    A kind person pointed out to me that in the code presented above at https://lowendtalk.com/discussion/comment/3983217/#Comment_3983217 and at https://lowendtalk.com/discussion/comment/3983223/#Comment_3983223 LuaJIT opens /dev/null only once and Python opens /dev/null for each write. It seems unfair to Python to make it do more work than LuaJIT. So the comparison shown here seems borked.

    I went ahead and redid the files, the compilation, and the comparison with modified Python code which was given to me by the person who pointed out the error:

    PyRun_SimpleString(
       "import os\n"
       "with open(os.devnull, 'w') as devnull:\n"
       "    for i in range(10000):\n"
       "        print('hello world from Python', file=devnull)"
    );
    

    Thanks to the kind person who pointed out the error and showed me the replacement Python code! <3

    @totally_not_banned

Sign In or Register to comment.