Does this query will be faster with a index on "t.type1" and "x.type1" or only index on "x.type1" is enought?
SELECT t.id, x.id
FROM t
INNER JOIN x ON x.type1=t.type1
WHERE t.id=1
Okay so i need really FAST algorithm or code in C if you have any it would be nice. The task is to sum all numbers from 1 to N for a given number N (it can be negative number too), so i did the usual way (you know just summing with loop from 1 to N) but it's not fast enough - i need something faster, i guess that i need the fastest possible way to do this.
If anyone could help me, please do. Thanks.
Typical approaches recommend reading the binary via FileStream and comparing it byte-by-byte.
Would a checksum comparison such as CRC be faster?
Are there any .NET libraries that can generate a checksum for a file?
I am working on a game that I am going to open to the public to have on their game.
The game stores lots of information (about 300 rows) per website and spends a lot of time updating values within this MySQL database.
Is it better (faster/efficient) to add a new table for every website or to just have 1000's of rows in one table and add a column "website_id" or similar?
Hi,
Im trying to find a way to plot a truss in matlab, i can do it by using an adjacancy matrix and the gplot function, but its very long winded approach especially if there are a lot of nodes connected to one another. Is there a faster way to do this?
I'm new to matlab and the programming world any help would be really appreciated.
JC
I'm creating something where users can upload an xml and data get's imported to the database.
Now I'm building some kind of a preview page where users will get to see how their input will look once it's stored.
What would be the fastest (in execution time), using XSL to transform the xml to a html page, or using php to render the output?
My guess is XSL is far more suitable (+ faster) for this (and by using a DTD there's no need for code written validation, right?)
Hi, all.
Yesterday, my supervisor told me that tmp-file-based session should be THE answer to session implementation, and I should abandon any idea of making sessions persistent.
He argues that file-based session is much faster and eaiser to use than other choices like db-based or memcached-based implementations.
What he said was really a shock to my past learning experience, so please tell me whether he was wrong and why?
Thanks in advance.
Hello,
My Visual Studio solution file has lots of build configurations that significantly differ in which projects are enabled, and which are not. I'd like to automatically unload all projects that are turned off in active build configuration to save RAM and make VS faster. Is this possible?
Hi, I am planning to participate in development of a code written in C language for Monte Carlo analysis of complex problems. This codes allocates huge data arrays in memory to speed up its performance, therefore the author of the code has chosen C instead of C++ claiming that one can make faster and more reliable (concerning memory leaks) code with C.
Do you agree with that? What would be your choice, if you need to store 4-16 Gb of data arrays in memory during calculation?
Which of the following isfaster, or are they equivalent?
(grabbing recent most records from a TIMESTAMP COLUMN)
SELECT UNIX_TIMESTAMP(`modified`) stamp
FROM `some_table`
HAVING stamp > 127068799
ORDER BY stamp DESC
or
SELECT UNIX_TIMESTAMP(`modified`) stamp
FROM `some_table`
WHERE UNIX_TIMESTAMP(`modified`) > 127068799
ORDER BY `modified` DESC
or even another combination?
I would like to compute both the sine and co-sine of a value together (for example to create a rotation matrix). Of course I could compute them separately one after another like a = cos(x); b = sin(x);, but I wonder if there is a faster way when needing both values.
I have an issue where due to some elements loading faster than others, the page looks broken for a few seconds at the start. An example is the CSS Pie behavior that allows me to do curved corners in IE, it appears before it becomes curved which looks bad. What would be ideal would be it somehow knowing when everything is loaded and then appear all at once, possibly including some kind of elegant visual way of not making the user feel impatient... any ideas or common tricks for doing this?
I'm sick of waiting hours for Flash to publish. .NET / VisualStudio projects are WAAAAY faster - is that only compiling the classes that have changed?
Update: Does the Flash IDE re-encode all your sounds and images every time you publish? Can't it cache them somewhere?
I use the following code to log a map, it is fast when it only contains zeroes, but as soon as there is actual data in the map it becomes unbearably slow... Is there any way to do this faster?
log_file = open('testfile', 'w')
for i, x in ((i, start + i * interval) for i in range(length)):
log_file.write('%-5d %8.3f %13g %13g %13g %13g %13g %13g\n' % (i, x,
map[0][i], map[1][i], map[2][i], map[3][i], map[4][i], map[5][i]))
Given that SSE 4.2 (Intel Core i7 & i5 parts) includes a CRC32 instruction, it seems reasonable to investigate whether one could build a faster general-purpose hash function. According to this only 16 bits of a CRC32 are evenly distributed. So what other transformation would one apply to overcome that?
David
Yes, I am aware of QUnit, but with the jQuery Paradigm all about getting things done faster with less code, and is this some how opposed to a TDD Paradigm? Or does it complement it somehow?
When I am concatenating object values together to form a string in VB.NET, is there a difference in performance or a recommended best practice between using the & concat or the + concat with calls to .ToString() on each object?
Example (which isfaster or best practice):
Dim result1 As String = 10 & "em"
Dim result2 As String = 10.ToString() + "em"
Possible Duplicates:
In .NET which loop runs faster for or foreach
c# for Vs foreach
I want to know which is the best For loop or foreach loop ? Performance wise.
I am trying to find out if there is an actual computational benefit to using lambda expressions in c++, namely "this code compiles/runs faster/slower because we use lambda expressions" OR is it just a neat development perk open for abuse by poor coders trying to look cool?
Thanks.
PS. I understand this question may seem subjective but i would much appreciate the opinion of the community on this matter.
I have a php mysql query like this
$query = "SELECT * FROM articles FORCE INDEX (articleindex) WHERE category='$thiscat' and did>'$thisdid' and mid!='$thismid' and status='1' and group='$thisgroup' and pid>'$thispid' LIMIT 10";
As optimization, I've indexed all the parameters in articleindex and I use force index to force mysql to use the index, supposedly for faster processing.
But it seems that this query is still quite slow and it's causing a jam and maxing out the max mysql connection limit.
Let's discuss how we can improve on such long query.
I have a php mysql query like this
$query = "SELECT * FROM articles FORCE INDEX (articleindex) WHERE category='$thiscat' and did>'$thisdid' and mid!='$thismid' and status='1' and group='$thisgroup' and pid>'$thispid' LIMIT 10";
As optimization, I've indexed all the parameters in articleindex and I use force index to force mysql to use the index, supposedly for faster processing.
But it seems that this query is still quite slow and it's causing a jam and maxing out the max mysql connection limit.
Let's discuss how we can improve on such long query.
i can thought that it will open a shell, execute the parameter (shell command) and return the result in a scalar.
But, execute 'system' function in a perl script isfaster than a shell command.
It will call this command in C?
If yes, what's the difference between
rmdir foo
and
system('rmdir foo');
Thanks,
Do I need to install .net 2.0 on the device, where .net 3.5 is installed?
So far my application works on .net 2.0 (which potentially should be faster) but the long term plan is to port it to .net 3.5. I need to order devices and the OEM needs to know which version of .net should be add to Windows CE image (version 5.0). Shall I ask him to add both .net 2.0 and .net 3.5 ?