Explorar el Código

minerd: Make some functions inline for speed

x hace 7 meses
padre
commit
fde44190cd
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      bin/minerd/src/cpu.rs

+ 3 - 0
bin/minerd/src/cpu.rs

@@ -27,14 +27,17 @@ impl CpuThread {
         Self { affinity, intensity: intensity.unwrap_or(0) }
     }
 
+    #[inline]
     pub fn is_valid(&self) -> bool {
         self.intensity <= 8
     }
 
+    #[inline]
     pub fn affinity(&self) -> i32 {
         self.affinity
     }
 
+    #[inline]
     pub fn intensity(&self) -> u32 {
         if self.intensity == 0 {
             1