Click here to Skip to main content
15,883,623 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionPlaying Music in VB.Net application [modified] Pin
DarkSorrow386-May-09 8:12
DarkSorrow386-May-09 8:12 
AnswerRe: Playing Music in VB.Net application Pin
Dave Kreskowiak6-May-09 8:35
mveDave Kreskowiak6-May-09 8:35 
GeneralRe: Playing Music in VB.Net application Pin
DarkSorrow386-May-09 8:54
DarkSorrow386-May-09 8:54 
GeneralRe: Playing Music in VB.Net application Pin
Dave Kreskowiak6-May-09 8:59
mveDave Kreskowiak6-May-09 8:59 
GeneralRe: Playing Music in VB.Net application Pin
DarkSorrow387-May-09 5:01
DarkSorrow387-May-09 5:01 
GeneralRe: Playing Music in VB.Net application Pin
Dave Kreskowiak7-May-09 14:20
mveDave Kreskowiak7-May-09 14:20 
AnswerRe: Playing Music in VB.Net application Pin
DidiKunz8-May-09 11:56
DidiKunz8-May-09 11:56 
Questionperformance problem - Array.Copy vs. Buffer.BlockCopy Pin
adamp22a6-May-09 8:08
adamp22a6-May-09 8:08 
Hi,

I have a problem to understand the perforance advantage
of Buffer.BlockCopy.

If I only copy the array one time the Buffer.BlockCopy-method is much more faster
then the Array.Copy-method, but if I copy the array in a for next loop the
perforance advantage is lost.

Here is the example-code:

Dim t As Long
Dim a(50000000) As Integer
Dim b(50000000) As Integer
Dim x As Integer = Buffer.ByteLength(a) - 1
Dim y As Integer = a.Length

'Copy with Array.Copy Method 1
t = Now.Ticks
Array.Copy(a, d, y)
ListBox1.Items.Add(Now.Ticks - t)

'Copy with Buffer.BlockCopy Method 1
t = Now.Ticks
Buffer.BlockCopy(a, 0, b, 0, x)
ListBox1.Items.Add(Now.Ticks - t)

'Copy with Array.Copy Method 100
t = Now.Ticks
For i As Integer = 0 To 5
Array.Copy(a, b, y)
Next
ListBox1.Items.Add(Now.Ticks - t)

'Copy with Buffer.BlockCopy Method 100
t = Now.Ticks
For i As Integer = 0 To 5
Buffer.BlockCopy(a, 0, b, 0, x)
Next
ListBox1.Items.Add(Now.Ticks - t)

thanks in advance
andre
AnswerRe: performance problem - Array.Copy vs. Buffer.BlockCopy Pin
Luc Pattyn6-May-09 8:32
sitebuilderLuc Pattyn6-May-09 8:32 
QuestionRe: performance problem - Array.Copy vs. Buffer.BlockCopy Pin
adamp22a6-May-09 9:39
adamp22a6-May-09 9:39 
AnswerRe: performance problem - Array.Copy vs. Buffer.BlockCopy Pin
Luc Pattyn6-May-09 9:45
sitebuilderLuc Pattyn6-May-09 9:45 
Questionformatting of data in list box in vb 2008 Pin
sazd16-May-09 2:56
sazd16-May-09 2:56 
AnswerRe: formatting of data in list box in vb 2008 Pin
Eddy Vluggen6-May-09 3:00
professionalEddy Vluggen6-May-09 3:00 
GeneralRe: formatting of data in list box in vb 2008 Pin
sazd16-May-09 3:15
sazd16-May-09 3:15 
AnswerRe: formatting of data in list box in vb 2008 Pin
Eddy Vluggen6-May-09 3:35
professionalEddy Vluggen6-May-09 3:35 
GeneralRe: formatting of data in list box in vb 2008 Pin
sazd17-May-09 2:56
sazd17-May-09 2:56 
GeneralRe: formatting of data in list box in vb 2008 Pin
Dave Kreskowiak7-May-09 4:49
mveDave Kreskowiak7-May-09 4:49 
AnswerRe: formatting of data in list box in vb 2008 Pin
Eddy Vluggen7-May-09 10:18
professionalEddy Vluggen7-May-09 10:18 
AnswerRe: formatting of data in list box in vb 2008 Pin
Henry Minute6-May-09 3:00
Henry Minute6-May-09 3:00 
QuestionDifference of two numbers Pin
Anubhava Dimri6-May-09 1:17
Anubhava Dimri6-May-09 1:17 
AnswerRe: Difference of two numbers Pin
Mycroft Holmes6-May-09 1:22
professionalMycroft Holmes6-May-09 1:22 
GeneralRe: Difference of two numbers Pin
Anubhava Dimri6-May-09 2:14
Anubhava Dimri6-May-09 2:14 
GeneralRe: Difference of two numbers Pin
Guffa6-May-09 4:25
Guffa6-May-09 4:25 
AnswerRe: Difference of two numbers Pin
Luc Pattyn6-May-09 3:52
sitebuilderLuc Pattyn6-May-09 3:52 
AnswerRe: Difference of two numbers Pin
Guffa6-May-09 4:22
Guffa6-May-09 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.