MCPcopy Create free account
hub / github.com/agenticsorg/lean-agentic / optimize_function

Method optimize_function

src/jit-runtime/mod.rs:149–174  ·  view source on GitHub ↗
(
        &self,
        function_id: &str,
        target_tier: JitTier,
    )

Source from the content-addressed store, hash-verified

147 }
148
149 fn optimize_function(
150 &self,
151 function_id: &str,
152 target_tier: JitTier,
153 ) -> Result<(), Box<dyn std::error::Error>> {
154 match target_tier {
155 JitTier::Tier1Baseline => {
156 self.compile_baseline(function_id)?;
157 }
158 JitTier::Tier2Optimizing => {
159 self.compile_optimizing(function_id)?;
160 }
161 JitTier::Tier3MaxOpt => {
162 self.compile_max_opt(function_id)?;
163 }
164 _ => {}
165 }
166
167 // Update tier
168 let mut functions = self.functions.write().unwrap();
169 if let Some(state) = functions.get_mut(function_id) {
170 state.current_tier = target_tier;
171 }
172
173 Ok(())
174 }
175
176 fn compile_baseline(
177 &self,

Callers 1

executeMethod · 0.80

Calls 4

compile_baselineMethod · 0.80
compile_optimizingMethod · 0.80
compile_max_optMethod · 0.80
get_mutMethod · 0.80

Tested by

no test coverage detected