Lightweight C ++ Scripting Library

I am currently using QtScript for scripting functionality in my C ++ application, but it is rather "heavy" on the processor. When the thread evaluates all the scripts in the loop, processor utilization increases to 90% -100%. Even when I slept for 1 ms every 5 scripts, it remains above 75% of CPU usage.

Are there any other, easy-to-implement, framework scripts that are much lighter than QScript?

change

Now I understand that this is normal behavior, and not some kind of error in QtScript. However, it is interesting to know which (lighweight) script libraries are available.

+3
source share
9

Lua, , .

+16

, ? script / , CPU 100%.

?

?

, script , . , ( " script" ) .

[]
: 100%, script?

100% , - .

, 100% , . "0% " , ( " ", ).

: , - 40%, - 1 , 400 600 .

+12

Lua , ++. , - , , .

iolanguage: iolanguage.

+3

TinyScheme. , Lua ( , ).

, - Lua , , :

  • ; lanugages . , , .
  • GC ( ), , GC - , lua. , GC (, ++, - , GC , , ..) .
  • , . - ( ) GC , .
+2

Lua . Windows, - LuaJIT, Lua

, , Squirrel (http://squirrel-lang.org/). , , .

, 100% CPU, , .

- ():

( = 1,10000000000000) = + end

100% , () - , , .

+2

:

  • ?
  • ?
  • script?
  • Qt?

Lua, : Lua ANSI C. uber-, ++, "" . , Qt- ( SIGNAL s, SLOT s PROPERTY s), .

+1

Lua - . Qt.

+1

javascript spidermonkey , javascript , lua.

0

QtScript , ( 4.6, , ). , , lua ​​ python. native ( c/++) API script, , , .

QtScript ( QT ) script ... QT ( , ).

++ , SWIG. SWIG toLua, , lua, #, tcl, java python, . , toLua , SWIG.

0

Source: https://habr.com/ru/post/1709194/


All Articles