CPU Cycles, Memory Usage, Execution Time, etc.?
Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs?
Hi Iam developing an image viewer application just like irfan-view or acdsee which should be capable to view lots of different image file formats (not just the standard ones which can be done with System.Drawing.Image).
Iam currently using ImageMagick but it isn't very fast and seems to be unstable with some image files.
Can anyone suggest a good imaging library, ideally with a .NET wrapper already present?
hi, currently in matlab i have int array a=[3,4,5,6,7];
i want to convert it to binary array with four bits each.
for the above int array i would get the following binary array abinary=[0,0,1,1, 0,1,0,0, 0,1,0,1, 0,1,1,0, 0,1,1,1];
is there any fast way to do it? thanks a lot!
I am starting a website and am wondering if I should go with PHP, a php framework, or ruby on rails? I want to make a website fast, easiest and without a big learning curve. I already know a little bit of php and a little ruby on rails...But which would be best?
OK so to clarify more on the topic of what my site will be, It's basically a Classified Ads website that needs to have a user login, ability to post classifieds, and categorizing, and basically anything else a classified website has.
I've got many files that I want to store in a single archive file. My first approach was to store the files in a gzipped tarball. The problem is, that I've to rewrite the whole archive if a single file is added.
I could get rid of the gzip compression, but adding a file would still be expensive.
What other archive format would you suggest that allows fast append operations?
Hi folks,
I've built a web application with Django, I'm using Memcached in order to cache data.
A few views cache the whole HttpResponse objects, therefore there might be a better alternative for returning the Memcached data other than going through Django.
What could be faster alternatives for returning Memcached data on HTTP Requests ?
I'm trying to make the operation as fast and lightweight as possible.
Help would be much appreciated! :)
Hello,
I am using a PHP/MySQL login script that sends a new user an activation email. When a new user registers, the info is put into MySQL pretty much instantly, but then it takes about 4 minutes for the activation email to arrive in the new user's inbox.
It seems like sites like Facebook and Twitter can get out an activation email instantly when a new user registers. Is there anything that I could do to make the activation email that I'm using arrive instantly or really fast?
Thanks in advance,
John
Hi,
I have a very basic doubt regarding cloud computing that is catching up pretty fast these days. To my understanding, cloud computing is a paradigm in which companies put up their data and applications on somebody else's machines aka 'The Cloud'. I want to know just how secure is it to put up my data on some third party machines, especially if my data contains private details. In particular, how can an enterprise trust the cloud computing service providers in this data privacy aspect?
Thanks,
rakesh.
Hello,
I have seen mysql queries with order by runs slow.
Is there any specific way to optimize queries which use order by ?
Queries without order by run very fast but with order by its always runs slow.
if any one suggest any thing on this as general solutions.
Thank You
I need to simply encode a string variable (my api key) so that is not easily readable by human eyes, I need it to easily decode back to exactly the same initial string. What is the standard practical and fast (less computing on the user side) way to do this?
Many thanks in advance!
Hi
I've had Jetty recommended as a good container for fast and simple development, in my case, Java Server Faces. I wish to use it with my Eclipse IDE (Version: 3.4.1), but quite frankly, can't figure out how.
I've tried various outdated plugins, only with large amounts of errors in return, so I'm hoping someone could guide me from downloading the right version to installing it, and being able to press "RUN", and see a simple Hello World in JSP/JSF work.
Cheers.
I have two tables, Table A with 700,000 entries and Table B with 600,000 entries. The structure is as follows:
Table A:
+-----------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------------------+------+-----+---------+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| number | bigint(20) unsigned | YES | | NULL | |
+-----------+---------------------+------+-----+---------+----------------+
Table B:
+-------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| number_s | bigint(20) unsigned | YES | MUL | NULL | |
| number_e | bigint(20) unsigned | YES | MUL | NULL | |
| source | varchar(50) | YES | | NULL | |
+-------------+---------------------+------+-----+---------+----------------+
I am trying to find if any of the values in Table A are present in Table B using the following code:
$sql = "SELECT number from TableA";
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_assoc($result)) {
$number = $row['number'];
$sql = "SELECT source, count(source) FROM TableB WHERE number_s < $number AND number_e > $number GROUP BY source";
$re = mysql_query($sql) or die(mysql_error);
while($ro = mysql_fetch_array($re)) {
echo $number."\t".$ro[0]."\t".$ro[1]."\n";
}
}
I was hoping that the query would go fast but then for some reason, it isn't terrible fast. My explain on the select (with a particular value of "number") gives me the following:
mysql> explain SELECT source, count(source) FROM TableB WHERE number_s < 1812194440 AND number_e > 1812194440 GROUP BY source;
+----+-------------+------------+------+-------------------------+------+---------+------+--------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------+------+-------------------------+------+---------+------+--------+----------------------------------------------+
| 1 | SIMPLE | TableB | ALL | number_s,number_e | NULL | NULL | NULL | 696325 | Using where; Using temporary; Using filesort |
+----+-------------+------------+------+-------------------------+------+---------+------+--------+----------------------------------------------+
1 row in set (0.00 sec)
Is there any optimization that I can squeeze out of this?
I tried writing a stored procedure for the same task but it doesn't even seem to work in the first place... It doesn't give any syntax errors... I tried running it for a day and it was still running which felt odd.
CREATE PROCEDURE Filter()
Begin
DECLARE number BIGINT UNSIGNED;
DECLARE x INT;
DECLARE done INT DEFAULT 0;
DECLARE cur1 CURSOR FOR SELECT number FROM TableA;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
CREATE TEMPORARY TABLE IF NOT EXISTS Flags(number bigint unsigned, count int(11));
OPEN cur1;
hist_loop: LOOP
FETCH cur1 INTO number;
SELECT count(*) from TableB WHERE number_s < number AND number_e > number INTO x;
IF done = 1 THEN
LEAVE hist_loop;
END IF;
IF x IS NOT NULL AND x>0 THEN
INSERT INTO Flags(number, count) VALUES(number, x);
END IF;
END LOOP hist_loop;
CLOSE cur1;
END
I know of:
http://lua-users.org/wiki/SimpleLuaApiExample
It shows me how to build up a table (key, value) pair entry by entry.
Suppose instead, I want to build a gigantic table (say something a 1000 entry table, where both key & value are strings), is there a fast way to do this in lua (rather than 4 func calls per entry:
push
key
value
rawset
Thanks!
I see that SRFI 4 does not mention resizing of vectors. I'm using f64vectors (for which I need fast access), and I'd like to be able to resize them quickly (similar to what realloc does in C), and not necessarily copy the whole vector.
Since I didn't find any references to a "resize-f64vector" procedure, I'd like to know why it doesn't exist (and if making a new vector and copying over is my only option).
Are there any high-level, cross-platform, and abstracted (simple to use) widget toolkits for C that are either very lightweight and fast or can be compiled for other toolkits, such as Qt and GTK+?
I'm writing a program that converts wavs to mp3s, so far, by using lame. It's generating a command line more or less like this:
"c:\Program Files (x86)\Lame for Audacity\lame.exe" --preset fast medium in.wav out.mp3
The problem I'm having is that no VBR or Xing headers are written to the MP3. How can I make lame.exe write those headers? Should I use another program to write those headers (platform is Windows, .Net 3.5)? Should I use another program for MP3 encoding?
I want to write programming which will connect to a network for some second then disconnect from it and it should be that much fast that other application should not fill it is disconnected so on which layer should i program i know how to disconnect and connect to the network so any suggestion ......
thanks in advance....
I found this site, http://www.apitalk.com/document.php?id=1184207999_1 and I'm not sure if this site is using ATL, STL, MFC, or just calling API functions directly.
I have done console programming with C++ and graphics programmign with C++ in Borland, but I've have never done Win32 C++ programming and I'm curious if anyone knows of a good site to start with?
Does anyone know of any good sites to recommend about getting up and going fast with Win32 API C++?
everyone!
I process video from IP cameras and have wrote a motion detection algorithm based on decompressed video analysis. But i really something more fast. I've found several papers about compressed domain analysis but have failed to find any implementations.
Can anyone recommend me some code?
found materials:
http://www.ist-live.org/intranet/school-of-informatics-university-of-bradford001-7/41410206.pdf/view
http://doc.rero.ch/lm.php?url=1000,43,4,20061128120121-NA/Bracamonte_Javier_-_A_Low_Complexity_Change_Detection_Algorithm_20061128.pdf
I'd like to detemine the amount of time it takes for my ASP.Net program to generate certain sql queries using linq.... note - I want the query generation time, not the query execution time. Is this possible, or even feasable (if its usually fast)?
My website has some heavy traffic and I want to cover all of my bases.
Hello,
if you have a function "test a b" which returns true if a and b are connected directly and if you have a given unordered list of things, what would be an elegant and fast solution to filter all connected things from given list?
Example:
let test a b = let diff = a - b in diff == 0 ;;
let lst = [4;1;7;3;8;9;2;0] ;;
filter_connected 2 lst ;;
- [4;1;3;2;0]
Any hints?
I want to write programming which will connect to a network for some second then disconnect from it and it should be that much fast that other application should not fill it is disconnected so on which layer should i program i know how to disconnect and connect to the network so any suggestion ......
thanks in advance....
in a large listview control collection (say 5000 items), adding a SINGLE extra
item can take 10+ seconds in windows vista/7, and that's just the LVM_INSERTITEM
message handling
it looks that it only affects LVS_ICON, LVS_REPORT and LVS_LIST are still very
fast
can anybody confirm this?
the same code on windows XP with similar listview window styles adds an extra
item instantly
thanks
nikos
I've got a mysql dataset that contains 86 million rows.
I need to have a relatively fast search through this data.
The data I'll be searching through is all strings.
I also need to do partial matches.
Now, if I have 'foobar' and search for '%oob%' I know it'll be really slow - it has to look at every row to see if there is a match.
What methods can be used to speed queries like this up?
G-Man