Hello
is there a fast algorithm, similar to power of 2, which can be used with 3, i.e. n%3.
Perhaps something that uses the fact that if sum of digits is divisible by three, then the number is also divisible.
This leads to a next question. What is the fast way to add digits in a number? I.e. 37 -> 3 +7 -> 10
I am looking for somethin...
I notice that some PHP frameworks, such as Kohana and CodeIgniter would look at the class name of a class to perform auto-loading. Traditionally, RTTI is expensive for C++; how expensive it is for PHP5, in comparison to:
A direct message call
Looking up a key in an associative array
Doing a message call via variables ( $class = 'foobar...
hello again
I am curious about performance of Java numerical algorithms, say for example matrix matrix double precision multiplication, using the latest JIT machines as compared for example to hand tuned SSE C++/assembler or Fortran counterparts.
I have looked on the web but most of the results come from almost 10 years ago and I under...
I just wrote a small application that read from a site feed and display in UITableViewCell. I am using custom view cell and my UITableView is screwed in scrolling like it is not very smooth in scrolling upside down. Any idea? Here's the code for my UITableViewCell,
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtInde...
I'm using gcc for my c programmes. How can I check which method is faster (suppose that I write a code to swap two numbers and I rewrote the same code using bit operator), is there any tool in linux to check the time,performance and space?
...
Would there be any noticeable performance hit if MTOM is turned on for a WCF service that isn't actually transferring any binary over the wire?
...
Hello,
I'm writing a web site (C#, ASP 3.5) while implementing a simple CMS.
In several limited places - I allow the site admin to manage the page content.
Editing the content is done by an Edit control - the output HTML is stored in the database (SqlServer Express).
Each time a page loads - I read the page HTML content from the db an...
I'm trying to improve the performance of my web app where a page does a long query to pull data from different tables on a database. It pulls invoice data with multiple item lines, invoice status, and with each line having additional properties from another table.
Is serialization worth considering for improvement? The tables are relate...
So I'm running perl 5.10 on a core 2 duo macbook pro compiled with threading support: usethreads=define, useithreads=define. I've got a simple script to read 4 gzipped files containing aroud 750000 lines each. I'm using Compress::Zlib to do the uncompressing and reading of the files. I've got 2 implementations the only difference betw...
Python's paster serve app.ini is taking longer than I would like to be ready for the first request.
I know how to profile requests with middleware, but how do I profile the initialization time? I would like it to not fork a thread pool and quit as soon as it is ready to serve so the time after it's ready doesn't show up in the profile....
I have the following two queries:
select count(*)
from segmentation_cycle_recipients scr
, segmentation_instance si
where si.access_code=scr.access_code
and si.segment_id is NOT NULL;
Returns 13429 rows in 0.2 secs
2)
select count(*)
from segmentation_cycle_recipients scr
, segmentation...
I have heard that prepared statements with SQLite should improve performance. I wrote some code to test that, and did not see any difference in performance with using them. So, I thought maybe my code was incorrect. Please let me know if you see any errors in how I'm doing this...
[self testPrep:NO dbConn:dbConn];
[self testP...
I have a table myTable with myGuid (uniqueidentifier), myValues (float), myGroup (integer) and a bunch of other fields which are not important right now. I want to do something as simple as:
SELECT SUM(myValues)
FROM myTable
WHERE myGuid IN (SELECT * FROM ##test)
GROUP BY myGroup
##test is just a temporary table with a single fiel...
1.. Is there any performance overhead caused by the usage of attributes? Think for a class like:
public class MyClass
{
int Count {get;set;}
}
where it has 10 attibutes (attributes being classes, where the attribute classes themselves are way larger than MyClass itself like:
public class FirstAttribute : Attribute
...
Hi,
I have a performance problem with the (WPF Toolkit) DataGrid. It contains about 1.000 rows (only eight columns) and scrolling is horribly slow and laggy. Also the initial load of the Window containing the DataGrid takes 5-10 seconds.
I did some research (using google and StackOverflow) but couldn't find anything besides the advice ...
I need to store some diffs of other tables' columns in the database. I want to use a single table.
Option A
Table with 4 columns:
id
content_type (VARCHAR 255, will be: datetime, integer, varchar, text/clob ...)
old_content (CLOB / TEXT, software serialized data for content-type)
new_content (CLOB / TEXT, software serialized data for...
I am reviewing code which creates a lot of threads. CreateThread documentation on Windows says that a all thread creation calls are serialized within a process. To estimate the performance impact of such code, I wonder how long does CreateThread take to run? I understand this depends on the number of DLLs already loaded into the process,...
Can it make any difference to query optimisation to have WHERE clauses in a different order for SQL Server?
For example, would the query plan for this:
select * from table where col1 = @var1 and col2 = @var2
be different from this?:
select * from table where col2 = @var2 and col1 = @var1
Of course this is a contrived example, and ...
Some high traffic sites seem to have almost crazy sprited images with almost everything in one big image.
How much of a difference will this make for high traffic sites vs the difficulty in maintenance long term?
I know this may be a bit of a 'how long is a piece of string' question but I am interested to understand any experience of...
Hello,
there is a better place where an object can be registered to a Notification Center?
In other words, for a matter of performance, it's a good practice to register an object as Notification listener in the init(), awakeFromNib() or other event handler?
Thanks!
...