Comparison of Character Processing Performance between Node. js and PHP and Python, node. jspython
Test Cases are divided into functions and classes for reading a large string of characters one by one.
Test code
Node. js
Function
var fs = require("fs");var content = fs.readFileSync("page.html", { encoding: "utf-8"});function chars(content){ var length = content.length; var pos = 0; while(pos ++
Class
var f
Algorithm Ideas
Sorting algorithms
Complexity of Time
Best case
Worst case scenario
Complexity of space
Stability
Insert Sort
Insert directly
O (N2)
O (N)
O (N2)
O (1)
Is
Hill sort
O (n (logn) 2)
O (1)
Whether
Exchange sort
Bubble sort
O (N2)
O (N)
O (N2)
O (1)
Is
Quick Sort
O (NLOGN)
O (NLOGN)
O (N2)
O (L
Using system;using system.collections.generic;using system.linq;using system.text;using System.Threading.Tasks; Using system.diagnostics;using autodesk.autocad.runtime;using autodesk.autocad.databaseservices;using Autodesk.autocad.applicationservices;using autodesk.autocad.editorinput;///} } }}At present, LINQ is very efficient, and later development can be assured with LINQ two times development.------------------------DWG drawing test results for 4m:Ed count:87796.0967LINQ count:8776
all related functions and settings in iniThe magic_quotes_gpc, magic_quotes_runtime, and magic_quotes_sybase parameters are removed. While get_magic_quotes_gpc and get_magic_quotes_runtime are retained, but false is always returned. The set_magic_quotes_runtime will produce the E_CORE_ERROR error.
========================================================== ======================EXT/SQLITE extension removedDon't be surprised. The extension removed this time is only ext/sqlite, andExt/sqlite3And e
Java collections Performance Comparison
Uncategorized,By Zen.
Actually, this is the original post address. If you have time, simply translate it.
List-thisIs an ordered list of objects, insertion order is maintained and retrieval order is in the list order but items can also be random accessed, duplicate items are allowed, generally allow storage of null values (the ones below do), generally fast to iterate
Sorting method
Average Time
Worst case scenario
Degree of stability
Extra Space
Note
Bubble
O (N2)
O (N2)
Stability
O (1)
N Hours better
Exchange
O (N2)
O (N2)
Not stable
O (1)
N Hours better
Choose
O (N2)
O (N2)
Not stable
O (1)
N Hours better
Insert
O (N2)
O (N2)
Stability
O (1)
Most are sorted better
Pressure testModify the profile of the httpd stress test to add to http.confSetHandler Server-status#Order Deny,allow#Deny from all#Allow from 124.192.11.16Extendedstatus onSetHandler Server-info#Order Deny,allow#Deny from all#Allow from 124.192.11.16Restart ServiceServeice httpd RestartHttp://192.168.56.20:8080/server-status####################################################TestConvention: 1 user = 1 requestMultiple averages for testsLoaderrunler 总共请求多少 并发多少-rw-r--r--. 1 root root 156K Janua
. Printf ("The by-the-%6.1f time is %d\n", I, float32 (D[i])/float32 (d[k-1]), K-1) }}When n=1000, the test results are as follows Time of the (0) =719386ms time of the (1) =. 428677ms Time of the (2) =930829ms 0is 2.2 21is 1.8 2When n=5000, the test result is as follows (because the error of mode 1, so its time is wrong)Time of the-0)= the. 003521ms1 1021Open file failed. Open BenchmarkFile.txt:too Many open files time of the-1)= +. 388994ms Time (2)= the. 777936ms0Cost time is
];//Current Item7obj[cur]=cur;8 }9 varlist=[];Ten for(Keyinchobj) { One List.push (Obj[key]) A } -Console.log (list);This method performs more efficiently, and many of the contents of the array do not crash in the browser, but the loop uses two timesTake another approach: Method threePrinciple: The loop array, which saves each item in the array as the property name and attribute value of the Obj object,But we found that if the property name already exists in the
of the network on the way to upload is roughly divided into two categories, such as the use of compiled components (DLL file) to upload, to use the Upload method must be installed on the server upload components or register components on the server to use; one is to upload using an precompiled code class, You do not need to register on the server to use it. These two types of components have more than 10 kinds, such as Aspsmartupload,aspupload,sa fileup,lyfupload, Transformation no component up
comparison | stored Procedure | performance | execution
Recently wrote a program to import IP and the region of the list of a plain text file into the database, the first use is to execute the INSERT statement directly with SqlCommand, and then know that SQL Server can optimize the stored procedures, eliminating the time to parse the statement, Faster than using INSERT statements directly. I put the INSERT
Some time ago in a migration of data pump and exp, found that the difference in efficiency is quite large. Here is an example of a simple comparison.
This article describes ways to improve the efficiency of IMPDP import.
The test in the previous article found that IMPDP's import speed is comparable to IMP's import speed. When Oracle introduced the data pump, it was mentioned that IMPDP's import speed was 10 times times higher than that of IMP. But fo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.