Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the differences between lua and nodejs

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the differences between lua and nodejs, the article is very detailed, has a certain reference value, interested friends must read it!

The difference: 1. Nodejs is a javascript runtime environment, while Lua is a lightweight scripting language. 2. Lua is small and efficient, the statically connected lua interpreter including the standard library is only 187K in size, while NodeJS is so heavy that the compiled interpreter is several M in size.

The operating environment of this tutorial: windows7 system, nodejs 12.19.0, Dell G3 computer.

NodeJS

Node.js was released in May 2009 and developed by Ryan Dahl. It is a JavaScript runtime environment based on Chrome V8 engine. It uses an event-driven, non-blocking I-peg O model to let JavaScript run on the server-side development platform. It makes JavaScript a scripting language on a par with PHP, Python, Perl, Ruby and other server-side languages.

Nodejs is based on the V8 engine, which is an open source JavaScript engine released by Google, which itself is the js interpretation part of the Chrome browser, but Ryan Dahl, like a genius, moved the V8 to the server to do the server software.

Lua

Lua is a lightweight and compact scripting language written in the standard C language and open in source code. It is designed to be embedded in the application so as to provide flexible extension and customization for the application.

The Lua language is small, and the statically connected lua interpreter, including the standard library, is only 187K in size (X861464 after strip) and is said to be very fast. Lua was used to embed C language at the beginning of its design. It has perfect interface and C interaction, so it is very suitable to be used as a glue language.

The connection and difference between lua and nodejs

What Lua and NodeJS have in common: both are single-threaded event models that combine dynamic and static languages.

The differences between Lua and NodeJS:

Node.js is a javascript runtime environment, while Lua is a lightweight scripting language.

Lua is small and efficient, and the statically connected lua interpreter, including the standard library, is only 187k in size

On the other hand, NodeJS is so heavy that the compiled interpreter alone is several M in size (mainly because V8 is too large).

The above is all the content of the article "what's the difference between lua and nodejs". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report