草庐IT

BranchNodeData

全部标签

c# - 为什么我的应用程序将 24% 的生命周期用于空值检查?

我有一个性能关键的二元决策树,我想将这个问题集中在一行代码上。下面是二叉树迭代器的代码以及对其运行性能分析的结果。publicScTreeNodeGetNodeForState(introotIndex,float[]inputs){0.2%ScTreeNodenode=RootNodes[rootIndex].TreeNode;24.6%while(node.BranchData!=null){0.2%BranchNodeDatab=node.BranchData;0.5%node=b.Child2;12.8%if(inputs[b.SplitInputIndex]BranchDat

c# - 为什么我的应用程序将 24% 的生命周期用于空值检查?

我有一个性能关键的二元决策树,我想将这个问题集中在一行代码上。下面是二叉树迭代器的代码以及对其运行性能分析的结果。publicScTreeNodeGetNodeForState(introotIndex,float[]inputs){0.2%ScTreeNodenode=RootNodes[rootIndex].TreeNode;24.6%while(node.BranchData!=null){0.2%BranchNodeDatab=node.BranchData;0.5%node=b.Child2;12.8%if(inputs[b.SplitInputIndex]BranchDat