speed

User Defined Functions in Excel and Speed Issues

I have an Excel model that uses almost all UDFs. There are say, 120 columns and over 400 rows. The calculations are done vertically and then horizontally --- that is first all the calculations for column 1 are done, then the final output of column 1 is the input of column 2, etc. In each column I call about six or seven UDFs which call o...

How do I speed up my Ruby application?

I am making a data intensive web application that I am trying to optimize. I've heard of forking and threading, but I have no idea whether they are applicable to what I am trying to do and if so how to implement them. My code looks like this: def search @amazon_data=Hash.from_xml(item.retrieve_amazon(params[:sku])) unles...

What does "built-in method decode" mean in Python when profiling?

I'm trying to make my program faster, so I'm profiling it. Right now the top reason is: 566 1.780 0.003 1.780 0.003 (built-in method decode) What is this exactly? I never call 'decode' anywhere in my code. It reads text files, but I don't believe they are unicode-encoded. ...

C# serialPort speed

Hi I am developing some monitoring tool for some kind of protocol based on serial communication. Serial BaudRate=187,5kb I use System.IO.Ports.SerialPort class. This protocol has 4 kinds of frames. They have 1Byte,3Bytes,6Bytes, 10-255Bytes. I can work with them but I receive them too late to respond. For the beginning I receive firs...

Can running 'cat' speed up subsequent file random access on a linux box?

Hi all, on a linux box with plenty of memory (a few Gigs), I need to access randomly to a big file as fast as possible. I was thinking about doing a cat myfile > /dev/null before accessing it so my file pages go in memory sequentially, hence faster than with a dry random access. Does this approach make sense to you? ...

How can I determine the speed of a USB port?

Is there an easy way to programmatically determine the speed (or version) of a USB port? I'm looking to control the speed of data sent to a usb port based its maximum bandwidth. ...

Speed of R Programming Language

R is a scripting language, but is it fast? It seems like a lot of the packages used by R are actually compiled from C. Does anyone have an example of how using languages like C or Java instead of R caused a noticeable increase in speed? Is there a fair benchmark somewhere? Is there a C (or any other compiled) library that has many of...

MySQL SELECT runs forever when join is changed

I have the following SQL code: select val.PersonNo, val.event_time, clg.number_dialed from vicidial_agent_log val join call_log clg on date_add('1970-01-01 02:00:00', interval clg.uniqueid second) = val.event_time order by val.event_time desc limit 100; which executes and returns rows in les...

What's the fastest way to fixup line-endings for SMTP sending?

Hello all. I'm coding a email application that produces messages for sending via SMTP. That means I need to change all lone \n and \r characters into the canonical \r\n sequence we all know and love. Here's the code I've got now: CRLF = '\r\n' msg = re.sub(r'(?<!\r)\n', CRLF, msg) msg = re.sub(r'\r(?!\n)', CRLF, msg) The problem is...

PHP loading xml feeds quickly

Hi, I am building a comparison shopping site that takes in multiple xml feeds and displays the best deals. I use PHP Simplexml and then sort them using php when the page loads. I use a library like this: http://www.developertutorials.com/blog/php/parallel-web-scraping-in-php-curl-multi-functions-375/ to process the feeds in parallel...

Which is faster? Using Quartz & CGRects vs an array UIImageViews

Just wondering weather its faster, if you have lots (~several hundred to a thousand) 2D images, to use Quartz or an array of UIImageViews. Cheers! ...

iron speed (get records function)

hi I want to get all the records from a table (SecurityTable) so I use this function (SecurityTable.getrecords("")) and the where clause is ("") but I have an error:out of array boundary I think the record id is the problem because they are from(30 to 40) is there any solution or is there any another way to get all the records with out t...

Why is Clojure much faster than Scala on a recursive add function?

A friend gave me this code snippet in Closure (defn sum [coll acc] (if (empty? coll) acc (recur (rest coll) (+ (first coll) acc)))) (time (sum (range 1 9999999) 0)) and asked me how does it fare against a similar Scala implementation. The Scala code I've written looks like this: def from(n: Int): Stream[Int] = Stream.cons(n, from(n+...

What are some small, fast and lightweight open source applications (µTorrent -esque)?

Possible duplicate What is the best open source example of a lightweight Windows Application? µTorrent is a small bit-torrent client, a really small one. It doesn't come with an installer, just a exe, you drop in your PATH somewhere. It's super lightweight and yet feature rich. Plus it is the work of one man. It's also close...

Why is subtraction faster than addition in Python?

I was optimising some Python code, and tried the following experiment: import time start = time.clock() x = 0 for i in range(10000000): x += 1 end = time.clock() print '+=',end-start start = time.clock() x = 0 for i in range(10000000): x -= -1 end = time.clock() print '-=',end-start The second loop is reliably faster, anyw...

Fastest iPhone Blit Routine?

I have a UIView subclass onto which I need to blit a UIImage. There are several ways to skin this cat depending on which series of APIs you prefer to use, and I'm interested in the fastest. Would it be UIImage's drawAtPoint or drawRect? Or perhaps the C-based CoreGraphics routines, or something else? I have no qualms about altering my so...

How to speed up serialization and transport for large object graphs; WCF 3.5 & SL3

I have a 3.5 SP1 project, WCF service which is limited to consumption by Silverlight 3 clients. Due to the business requirements we have to work with large object graphs that are hydrated via SQL Server on the WCF side and then sent to the Silverlight client. They are deep, you might have a class that has two collection properties and ea...

Is Flex Slow (Loading)?

i am actually picking up flex. when i made some "Hello World" apps, i noticed that Flex seem to load v slowly compared to HTML versions (once loaded speed is normal). is Flex slow? maybe it will be better if i compare it to a more complex app, say with a few forms etc? i am actually intending to learn AIR. i get the impression that Fle...

Slow start of interpreters and frameworks: whose convenience is more important?

Usually if you write a program using a well-known interpreter/script language or framework, there's usually a thing the developer can't control - how long it will take for program to start. But due to innovative nature such languages are easier to develop and reflects the infamous RAD concept. On the other side a user usually don't care ...

System.out.print + OS redirect vs writing to a file, which is faster?

I'm making a program that process a big file and output something to another that I need to use later. I'm wondering should I just print the output and redirect that to a file, or should I just write to the file in the program. Since this will be a very big file, I would like to know which way is faster, every bit counts. ...