速度提升 [英] Speed inprovement

查看:111
本文介绍了速度提升的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在构建一个需要高速执行的应用程序。有很多字符串解析我在VB.NET中做了很多字符串解析。


如果在dll中进行所有字符串解析,我是否会获得速度以
C或C ++编码并添加到我的VB.NET应用程序中?


我也会获得便携性的优势,但我主要担心的是/>
执行速度。


谢谢!


Marty

Hi,

I am building an application that need high speed of execution. There
is a lot of string parsing that I do in VB.NET.

Do I gain in speed if all that string parsing is made in a dll coded in
C or C++ and added to my VB.NET application?

I would also gain the advantage of portability, but my main concern is
speed of execution.

Thank you!

Marty

推荐答案

>我正在构建一个需要高速执行的应用程序。我在VB.NET中有
> I am building an application that need high speed of execution. There is
很多字符串解析。

如果所有字符串解析都是在用C编码的dll中进行的,那么我是否会获得速度br />或C ++并添加到我的VB.NET应用程序中?

我也会获得可移植性的优势,但我主要担心的是执行速度。
a lot of string parsing that I do in VB.NET.

Do I gain in speed if all that string parsing is made in a dll coded in C
or C++ and added to my VB.NET application?

I would also gain the advantage of portability, but my main concern is
speed of execution.




但是为什么会这样呢?


VBNet中有很快的字符串处理类。但是总有一些情况无法处理。


Cor



Can be, however why would it?

There are very fast classes for string handling in VBNet. But there can
always situations which cannot be handled.

Cor


Hi Cor,


以下是我想要做的事情:


这是我要解析的字符串的描述。大约100

不同的字符串,大约60到100个字节长。


每个字符串都包含连接字段。有些是非格式化的数字,

日期,时间和许多其他特定字段。


没有办法拆分这些字符串并且易于阅读阵列。对于

每个字符串我必须使用mid
Hi Cor,

Here is the idea of what I want to do:

Here is a description of the strings I have to parse. Approx 100
different string of approx 60 to 100 bytes long.

Each string contain concatened fields. Some are non formatted numbers,
date, time, and many others specific fields.

There is no way to split those string and get a easy to read array. For
each string I have to use mid


并获得每个单独的字段和格式

它应该是它的方式。有些字段需要基本的数学计算才能有一个人类可读的数字。


此时我正在考虑将C dll用于读取目的,我

的意思是,将原始字符串传递给dll,并返回一个解析后的数组

所有字段(数据类型字符串)。


在这个VB.NET代码中,我使用string.substring()函数来获取

部分字符串。是否有更好的VB.NET处理?


你认为我可以在这种情况下使用C / C ++ dll获得速度吗?


谢谢你的回复。

Marty


Cor Ligthert写道:
and get each separate fields and format
it in the way it should be. Some fields need basic mathematic
calculation to have a human readable number.

At this point I was thinking to make the C dll for reading purpose, I
mean, pass the raw string to the dll, and it return a parsed array of
all fields (of data type string).

In this VB.NET code I use the string.substring() function to to get
parts of string. Is there a better VB.NET handling for that?

Do you think I could gain speed using a C/C++ dll for this situation?

Thank you for your reply.
Marty

Cor Ligthert wrote:
我正在构建一个需要高速执行的应用程序。我在VB.NET中进行了大量的字符串解析。

如果所有的字符串解析都是用C编写的dll进行的,那么我是否会获得速度提升或者C ++并添加到我的VB.NET应用程序中?

我也会获得可移植性的优势,但我主要担心的是执行速度。
I am building an application that need high speed of execution. There is
a lot of string parsing that I do in VB.NET.

Do I gain in speed if all that string parsing is made in a dll coded in C
or C++ and added to my VB.NET application?

I would also gain the advantage of portability, but my main concern is
speed of execution.



可以,但为什么会这样呢?

VBNet中有很快的字符串处理类。但总有一些情况无法处理。

Cor


Can be, however why would it?

There are very fast classes for string handling in VBNet. But there can
always situations which cannot be handled.

Cor



这篇关于速度提升的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆