MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / should_use_parallel

Function should_use_parallel

crates/parser/src/parallel.rs:37–43  ·  view source on GitHub ↗
(options: &ParserOptions, num_functions: usize, code_section_bytes: usize)

Source from the content-addressed store, hash-verified

35}
36
37pub(crate) fn should_use_parallel(options: &ParserOptions, num_functions: usize, code_section_bytes: usize) -> bool {
38 if num_functions < MIN_FUNCTIONS || code_section_bytes < MIN_CODE_SECTION_BYTES {
39 return false;
40 }
41
42 worker_count(options, num_functions) > 1
43}
44
45fn worker_count(options: &ParserOptions, num_functions: usize) -> usize {
46 let requested = options

Callers 1

begin_code_sectionMethod · 0.85

Calls 1

worker_countFunction · 0.85

Tested by

no test coverage detected