在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) 以下代码直接来自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) 有没有人尝试使用Excelsior JET对在普通Java运行时上及时运行的同一应用程序编译为本机的Java应用程序进行基准测试?我能找到的唯一基准是托管在Excelsior的网站上,用于单个应用程序; 我想看一些独立的结果.
我的应用程序具有高CPU和内存使用率(它是训练机器学习模型).我不希望使用Jet提高性能,但我可能需要在没有Java运行时可用的环境(因此编译为本机)上运行,我需要知道性能是否会更差.
我知道Excelsior有一个评估.可用,但我希望节省下载,配置,测试等时间......