473,425 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

VB.NET Express speed issue

Hi,

I've written a programme that processes stock market price data in
VB.NET 2005 Express. I've optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

The code is slow because it is processing large amounts of data many
many times.

However, is there a way to compile the code to other formats to make it
run faster? I've heard of C++ (too difficult for me).

Does the Full Paid Version of VB.NET run code faster than the express
version?

Many thanks,
Alex

Aug 16 '06 #1
10 1683

"Ali Chambers" <in**@alexchambers.co.ukwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,

I've written a programme that processes stock market price data in
VB.NET 2005 Express. I've optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

The code is slow because it is processing large amounts of data many
many times.

However, is there a way to compile the code to other formats to make it
run faster? I've heard of C++ (too difficult for me).

Does the Full Paid Version of VB.NET run code faster than the express
version?
No it's the same. If you post a simple sample program that illustrates your
performance problem you're likely to get some advice.

David
Aug 16 '06 #2
Ali Chambers wrote:
I've written a programme that processes stock market price data in
VB.NET 2005 Express. I've optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...
Why would you think that passing parameters to functions would result
in any appreciable performance loss?
>
The code is slow because it is processing large amounts of data many
many times.
You say the code is slow, how did you measure this? What is the size
of the data you are processing and how long does it take? How long do
you think it *should* take? What is your basis for comparison?

According to the 80/20 rule, the program spends 80% of the time in only
20% of the code. That 20% of the code is what should be measured first
and then the remaining code as needed. I suggest getting a code
profiler and finding out where the bottlenecks actually lie and start
your investigation there.

Since .Net intermediate code is JIT compiled into native machine code,
it should not run any slower than other code.

Good Luck

Aug 16 '06 #3
Ali,

In addition to the others,

I think that we are special intereste in that array part, because using real
array's slows down often the process.

All managed code program language from Microsoft create the same end code in
every versie and run all at the same speed.

Cor

"Ali Chambers" <in**@alexchambers.co.ukschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,

I've written a programme that processes stock market price data in
VB.NET 2005 Express. I've optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

The code is slow because it is processing large amounts of data many
many times.

However, is there a way to compile the code to other formats to make it
run faster? I've heard of C++ (too difficult for me).

Does the Full Paid Version of VB.NET run code faster than the express
version?

Many thanks,
Alex

Aug 16 '06 #4
Thanks for your help. I appreciate the programme may take a long time
to run whatever the language.

I wondered:

a) If MS didn't allow "fast code optimisation" in VB Express - ie.
force you to buy full product to get true speed realisation

b) The code is as follows:

- Price data is held in "double" floating point array, eg:-
highprice(0-9999)
- Comparisons are done between highprice(0-9999) and lowprice(0-9999)
- Buy levels are determined and these buy points held in arrays
- The programme then loops through the price arrays incrementally to
find sell prices - at which it sells and records the price (a basic
description!)

Different levels for buy & selling are tested (too complicated for this
email). On average, the buy/sell routine is called 3 million times per
stock.

c) Are there third party products to speed up the code?

d) Or - off topic - would another language be better?

Sorry - basic questions - but I'm a novice coder.

Alex

Aug 16 '06 #5
Looks rather you should review how you proceed (for example the "looping in
an array to find" would make me think an arrayb is not the suitable data
structurss for this particular part)... etc...

--
Patrice

"Ali Chambers" <in**@alexchambers.co.uka écrit dans le message de news:
11**********************@i3g2000cwc.googlegroups.c om...
Thanks for your help. I appreciate the programme may take a long time
to run whatever the language.

I wondered:

a) If MS didn't allow "fast code optimisation" in VB Express - ie.
force you to buy full product to get true speed realisation

b) The code is as follows:

- Price data is held in "double" floating point array, eg:-
highprice(0-9999)
- Comparisons are done between highprice(0-9999) and lowprice(0-9999)
- Buy levels are determined and these buy points held in arrays
- The programme then loops through the price arrays incrementally to
find sell prices - at which it sells and records the price (a basic
description!)

Different levels for buy & selling are tested (too complicated for this
email). On average, the buy/sell routine is called 3 million times per
stock.

c) Are there third party products to speed up the code?

d) Or - off topic - would another language be better?

Sorry - basic questions - but I'm a novice coder.

Alex

Aug 16 '06 #6
Patrice - so what would you suggest then?

Aug 16 '06 #7
Sounds to me like you need to store this information in a database and
instead or incrementing through your array to match a specific value,
you should just select it from among 3 million records.
Ali Chambers wrote:
Patrice - so what would you suggest then?
Aug 16 '06 #8
Ali,

I said already Arrays are extremely slow to handle at least you can have a
look at the list classes from which the arraylist is the most simple one.

http://msdn.microsoft.com/library/de...classtopic.asp

But there are more advices given including that what you are asking now,
because your reaction I have the idea that you did read nothing of those..

Cor

"Ali Chambers" <in**@alexchambers.co.ukschreef in bericht
news:11**********************@i3g2000cwc.googlegro ups.com...
Thanks for your help. I appreciate the programme may take a long time
to run whatever the language.

I wondered:

a) If MS didn't allow "fast code optimisation" in VB Express - ie.
force you to buy full product to get true speed realisation

b) The code is as follows:

- Price data is held in "double" floating point array, eg:-
highprice(0-9999)
- Comparisons are done between highprice(0-9999) and lowprice(0-9999)
- Buy levels are determined and these buy points held in arrays
- The programme then loops through the price arrays incrementally to
find sell prices - at which it sells and records the price (a basic
description!)

Different levels for buy & selling are tested (too complicated for this
email). On average, the buy/sell routine is called 3 million times per
stock.

c) Are there third party products to speed up the code?

d) Or - off topic - would another language be better?

Sorry - basic questions - but I'm a novice coder.

Alex

Aug 16 '06 #9
I would suggest a Hashtable or a database

if you really want to do everything in memory then a hashtable is the
fastest option

why is a hashtable faster as a "normall" array ( in fact is a hashtable a
special kind of array , same for collections and even datarows etc etc )
see this :
http://en.wikipedia.org/wiki/Hash_table
regards

Michel Posseth [MCP]


"Ali Chambers" <in**@alexchambers.co.ukschreef in bericht
news:11*********************@75g2000cwc.googlegrou ps.com...
Patrice - so what would you suggest then?

Aug 16 '06 #10
If you are using ReDim to resize your array when data is added, this is
extremely slow!
--
Dennis in Houston
"Ali Chambers" wrote:
Patrice - so what would you suggest then?

Aug 16 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Maboroshi | last post by:
Hi I am fairly new to programming but not as such that I am a total beginner From what I understand C and C++ are faster languages than Python. Is this because of Pythons ability to operate on...
12
by: John Gabriel | last post by:
lThe compiler output report is seldom correct: Problems here involve not being able to generate an accurate compile report. There are so many problems and I am not on Microsoft's payroll. Neither...
6
by: Ham | last post by:
Yeah, Gotto work with my VB.Net graphic application for days, do any possible type of code optimization, check for unhandled errors and finally come up with sth that can't process 2D graphics and...
11
by: sumana_m | last post by:
I have downloaded the freely available express edition of Visual Web Developer. If I develop an application using this, will I be able to market my product for commercial purposes without having...
45
by: mistral | last post by:
Does Visual C++ 2005 Express Edition produce small, compact C executables? Or there is another C compilers that do this better? m.
2
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split...
2
by: Frank Swarbrick | last post by:
I had asked a question a few weeks ago about having problems at times accessing DB2 Express-C 9.1, and getting "SQL1032N No start database manager command was issued. SQLSTATE=57019" even when the...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
25
by: Marco | last post by:
Hi everyone. I've been trying to move some small applications written in vb.net 2003 to vb.net 2005 express just for testing purposes. I have noticed so far that the applications seem to run ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.