小编Phi*_*lch的帖子

.NET JIT潜在错误?

在Visual Studio中运行发行版并在Visual Studio外部运行发行版时,以下代码提供了不同的输出.我正在使用Visual Studio 2008并以.NET 3.5为目标.我也尝试过.NET 3.5 SP1.

当在Visual Studio外部运行时,JIT应该启动.或者(a)C#中有一些微妙的东西我缺失或者(b)JIT实际上是错误的.我怀疑JIT可能出错,但我已经没有其他可能性......

在Visual Studio中运行时输出:

    0 0,
    0 1,
    1 0,
    1 1,
Run Code Online (Sandbox Code Playgroud)

在Visual Studio外部运行发布时的输出:

    0 2,
    0 2,
    1 2,
    1 2,
Run Code Online (Sandbox Code Playgroud)

是什么原因?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Test
{
    struct IntVec
    {
        public int x;
        public int y;
    }

    interface IDoSomething
    {
        void Do(IntVec o);
    }

    class DoSomething : IDoSomething
    {
        public void Do(IntVec o)
        {
            Console.WriteLine(o.x.ToString() + " " + o.y.ToString()+",");
        }
    }

    class Program
    { …
Run Code Online (Sandbox Code Playgroud)

c# jit

400
推荐指数
3
解决办法
7669
查看次数

Winforms treeview,递归检查子节点问题

以下代码直接来自Microsoft,网址http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.aftercheck%28VS.80%29.aspx.

  // Updates all child tree nodes recursively.
  private void CheckAllChildNodes(TreeNode treeNode, bool nodeChecked)
  {
   foreach (TreeNode node in treeNode.Nodes)
   {
    node.Checked = nodeChecked;
    if (node.Nodes.Count > 0)
    {
     // If the current node has child nodes, call the CheckAllChildsNodes method recursively.
     this.CheckAllChildNodes(node, nodeChecked);
    }
   }
  }

  // NOTE   This code can be added to the BeforeCheck event handler instead of the AfterCheck event.
  // After a tree node's Checked property is changed, all its child …
Run Code Online (Sandbox Code Playgroud)

checkbox treeview winforms

15
推荐指数
1
解决办法
9877
查看次数

有没有人对标准的Java运行时基准Excelsior JET编译到原生?

有没有人尝试使用Excelsior JET对在普通Java运行时上及时运行的同一应用程序编译为本机的Java应用程序进行基准测试?我能找到的唯一基准是托管在Excelsior的网站上,用于单个应用程序; 我想看一些独立的结果.

我的应用程序具有高CPU和内存使用率(它是训练机器学习模型).我不希望使用Jet提高性能,但我可能需要在没有Java运行时可用的环境(因此编译为本机)上运行,我需要知道性能是否会更差.

我知道Excelsior有一个评估.可用,但我希望节省下载,配置,测试等时间......

java performance compilation

11
推荐指数
2
解决办法
4492
查看次数

标签 统计

c# ×1

checkbox ×1

compilation ×1

java ×1

jit ×1

performance ×1

treeview ×1

winforms ×1