-- comentado de prueba

This commit is contained in:
2023-04-04 18:17:21 -07:00
parent 5578e2ff91
commit 165d9e223f

View File

@@ -71,7 +71,6 @@ Partial Class OC_CatEstatus
CargaEstatus() CargaEstatus()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
CargaUsuarios() CargaUsuarios()
sssss()
'SOLO MUESTRA SUBPROYECTO 'SOLO MUESTRA SUBPROYECTO
@@ -89,55 +88,55 @@ Partial Class OC_CatEstatus
End If End If
End Sub End Sub
Private Sub sssss() 'Private Sub sssss()
Dim length = 200000 ' Dim length = 200000
Dim concatString = "" ' Dim concatString = ""
Dim aaa As New StringBuilder ' Dim aaa As New StringBuilder
Dim stopWatch = New Stopwatch() ' Dim stopWatch = New Stopwatch()
stopWatch.Start() ' stopWatch.Start()
For i As Integer = 0 To length - 1 ' For i As Integer = 0 To length - 1
concatString = concatString & i ' concatString = concatString & i
Next ' Next
stopWatch.[Stop]() ' stopWatch.[Stop]()
aaa.Append($"String Concat took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>") ' aaa.Append($"String Concat took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset() ' stopWatch.Reset()
concatString = String.Empty ' concatString = String.Empty
stopWatch.Start() ' stopWatch.Start()
For i As Integer = 0 To length - 1 ' For i As Integer = 0 To length - 1
concatString = $"{concatString}a" ' concatString = $"{concatString}a"
Next ' Next
stopWatch.[Stop]() ' stopWatch.[Stop]()
aaa.Append($"String Interpolation took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>") ' aaa.Append($"String Interpolation took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset() ' stopWatch.Reset()
concatString = String.Empty ' concatString = String.Empty
Dim stringBuilder = New StringBuilder() ' Dim stringBuilder = New StringBuilder()
stopWatch.Start() ' stopWatch.Start()
For i As Integer = 0 To length - 1 ' For i As Integer = 0 To length - 1
stringBuilder.Append("a") ' stringBuilder.Append("a")
Next ' Next
concatString = stringBuilder.ToString() ' concatString = stringBuilder.ToString()
stopWatch.[Stop]() ' stopWatch.[Stop]()
aaa.Append($"String Builder took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>") ' aaa.Append($"String Builder took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset() ' stopWatch.Reset()
concatString = String.Empty ' concatString = String.Empty
stopWatch.Start() ' stopWatch.Start()
For i As Integer = 0 To length - 1 ' For i As Integer = 0 To length - 1
concatString = String.Format("a{0}", i) ' concatString = String.Format("a{0}", i)
Next ' Next
stopWatch.[Stop]() ' stopWatch.[Stop]()
aaa.Append($"String.Format took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>") ' aaa.Append($"String.Format took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
Alert(aaa.ToString) ' Alert(aaa.ToString)
End Sub 'End Sub
#Region "C A T A L O G O " #Region "C A T A L O G O "
Public Sub CargaDatos() Public Sub CargaDatos()