Skip to content

Configuration Directives

Chung Leong edited this page Feb 12, 2014 · 7 revisions

qb.column_major_matrix

Use column-major matrix convention instead of row-major. Should be set prior to calls to qb_compile().

(introduced in version 1.4)

Default: on


qb.allow_native_compilation

Allow compilation to native code. This option can only be set in php.ini.

Default: off


qb.compile_to_native

Compile functions to native code unless they're specifically set to use bytecode interpretation (@engine qb-bytecode). Has no effect unless qb.allow_native_compilation is turned on.

Default: off


qb.compiler_path

Path to the C compiler.

Default: gcc on Linux/Unix, cl.exe on Windows


qb.compiler_env_path

The PATH environment variable for the compiler.

Default: inherited


qb.native_code_cache_path

Path to the folder where compiled native code (object files) is stored.

Default: temporary folder of operation system


qb.allow_bytecode_interpretation

Allow bytecode interpretation to occur. Setting this option to off means that only native code execution is permitted. Normally when QB fails to compile a function to native code, it would fall back to using bytecode interpretation. Turn it off could be useful for testing purpose.

Default: on


qb.allow_memory_map

Allow the use of memory mapped files. If this option to turned off and a file resource is passed to a PHP+QB function, the file in its entirety would be read into memory instead.

This option can only be set in php.ini.

Default: on


qb.allow_debugger_inspection

Allow xdebug to inspect variables inside a PHP+QB function. When QB detects the presence of a PHP debugger, it generates extra instructions to enable the inspection of variables inside PHP+QB functions. The overhead is very high. Turn this option off if there's a PHP+QB function that perform a large number of iterations and you do not actually need to step into it.

Default: on


qb.allow_debug_backtrace

Allow debug_backtrace() to see PHP+QB function calls. Normally, QB does not update the PHP call stack when one PHP+QB function calls another PHP+QB function. The calls are through invisible to debug_backtrace(). When this option is turned on, QB adds the necessary data for debug_backtrace() so you can see the correct call stack--at the cost of significant performance degradation.

Default: off


Advanced Options

The following directives are used by the developers of QB to debug and optimize it:

qb.execution_log_path

Path to a log file to which the duration of each PHP+QB function's execution is recorded

Default: no logging


qb.show_opcodes

Show the opcodes generated by the QB compiler.

Default: off


qb.show_native_source

Show the C code generated by QB when it compiles a function to native code.

Default: off


qb.show_compiler_errors

Show error messages from the compiler.

Default: off


qb.show_source_opcodes

Show the Zend opcodes of a PHP function being compiled.

Default: off


Clone this wiki locally