与统计/模拟软件交互时,C# 和 Java 哪一种更简单、更快速?

发布于 2024-08-20 06:54:06 字数 433 浏览 5 评论 0 原文

首先,我对这种类型的接口几乎一无所知,这是我第一次尝试。我希望使用一种统计/模拟软件 Maple 或 Mathematica 或 R 进行计算,并使用 C#/Java 来处理其他领域,如持久性和数据收集等。

您能否告诉我,这些平台 (.Net/Java) 中的哪一个在以下方面对本次练习更友好: 将

  • 数据准备为统计软件可用的格式所需的
  • 工作量 内存要求和之间通信所需的时间方面的 性能两个程序。

我知道单一平台可能并不适合所有这些平台,一个平台可能对枫树来说非常好,但对 R 来说太糟糕了。我正在寻找的是一个很好的组合。

为什么我不固定使用 Maple/Mathematica/R 之一?嗯,它们都对我来说是可用的,而且我想要计算的内容非常常见,并且在所有这些中也可用。

因此,归根结底在于哪一个易于连接。

干杯

First, I know almost nothing about the interfacing of this type and this is the first time, I'm trying it out. I am looking to use one of the Statistics/Simulation software either Maple or Mathematica or R for calculations and use C#/Java to handle other areas like persistence and data collection and so on.

Can you tell me which one of these platforms (.Net/Java) is more friendly for this exercise in terms of:

  • Effort required to prepare the data to the format usable by statistics software
  • Performance in terms of memory requirement and time required for communication between two programs.

I understand that a single platform may not be good for all of them and one may be very good for say maple but too bad for R. What I'm looking for is a good combination.

And why I'm not fixed on one of Maple/Mathematica/R? Well, they all are available to me and what I'm trying to calculate is pretty much common and also available in all of them.

So it has come down to which one is easy for interfacing.

Cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

未央 2024-08-27 06:54:06

准备数据所需的努力
统计可用的格式
软件

这确实没有概述问题。如果您要进行一些复杂的解析,答案可能更多地围绕可用的库。在什么都不知道的情况下,我会猜测Java。如果不需要特殊的库,它们可能是相同的。

内存方面的性能
要求和所需时间
两个程序之间的通信

两者之间的内存是相似的,并且主要是您的应用程序和您使用的库的各个方面的一个因素。对于 cpu 性能,在所有其他方面都相同的情况下,我通常发现 CLR 的原始性能比 JVM 更好。但是,请小心该声明。根据您使用的代码和库,您可能会得到截然不同的结果。

另一项考虑因素取决于您问题的性质。如果您发现有一些密集处理可以卸载到本机代码中,您会发现从 CLR 访问本机代码比从 JVM 访问本机代码要容易得多、速度更快。

Effort required to prepare the data to
the format usable by statistics
software

This really doesn't outline the problem. If you are going to be doing some complicated parsing, the answer may be more around the available libraries. Without knowing anything, I would guess Java. If no special libraries are required, they are probably equal.

Performance in terms of memory
requirement and time required for
communication between two programs

Memory between the two is similar and is mostly going to be a factor of aspects of your application and libraries you use. For cpu performance, all other aspects equal, I usually find that the CLR has better raw performance than the JVM. However, be careful with that statement. Depending on what code and libraries you are using, you could get wildly different results.

One other consideration depending on the nature of your problem. If you find you have some intensive processing that could be offloaded into native code, you will find that it is much easier, and faster, to access native code from the CLR than from the JVM.

记忆里有你的影子 2024-08-27 06:54:06

请查看此处,了解有关您可能想要使用哪种语言的一些深入见解。 Java 可能会得到最好的支持(尽管我确实不想这么说)

Look here for some good insights on which language you might want to use. Java is probably going to have the best support (though I do hate to say that)

污味仙女 2024-08-27 06:54:06

有两个问题。

  • 准备数据。通常任何语言都可以,但 Perl 非常适合处理文本。
  • 接口。这是高度依赖于程序的,所以它是相反的。你只能在 Unix 上使用 IPC 与它对话吗?那么 C# 就出局了,如果你只能在 WIndows 下使用 COM 与它对话,C# 可能会更好。

因此,弄清楚您将使用什么包以及它可以做什么。

There are two issues.

  • Preparing data. Any language will usually do, but Perl is great for massaging text.
  • Interfacing. This is highly program dependent so it goes the other way. Can you only talk to it using IPC on Unix, well then C# is out, if you can only talk to it using COM under WIndows C# is probably better.

So, figure out what package you will use, and what it can do.

猫弦 2024-08-27 06:54:06

就语言而言,您不太可能看到真正的差异。也许 C# 因为它更新而更好。然而,Java 的存在时间更长,并且拥有更多的开源库。这意味着您更有可能在 Java 中找到适合您的 X 或 Y 功能的库。

这里只是一些可用的开源 Java 库。 http://java-sources.org/1
Google 可以帮助您找到更多图书馆。

I terms of the language, you are unlikely to see a real difference. Perhaps C# is nicer as its newer. However, Java had been around longer and has far more open source libraries. This means you are more likely to find a library which does X or Y to suit you in Java.

Here is a just a few of the open source Java libraries available. http://java-sources.org/1
Google can help you find many more libraries.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文