KBD

Keith Devens .com

Friday, August 8, 2008 Flag waving
And we know that in all things God works for the good of those who love him, who have been... – Paul (Romans 8:28)
← Entry 1720Entry 1722 →

Daily link icon Wednesday, March 27, 2002

Entry 1721

Pre-processing (or composition of functions)

This is sort of a theoretical question. How do we know if it is easier to perform an operation on some data by splitting it into two simpler operations that do the same thing as the original operation you wanted to perform? So when f(x) = (g o h)(x), how do we know when we can benefit by using (g o h)(x) instead of f(x)?

As a perfect example, it's less expensive computationally to sort and then search an unsorted list than it is to search the original unsorted list.

The reason I ask is, I'm looking again at the Pyxie XML processing library (which I've looked at before) (also see this followup to the XML.com article). I'm wondering if it's simpler to convert XML to PYX and then process it than it is to process the raw XML in the first place. It's probably simpler to program a parser in these two steps, but is it also simpler in a theoretical sense? Will it take less time computationally?

The reason I'm asking the question is a mundane one, but I'm mostly interested in the theoretical aspects of this. How can we study this phenomenon? How do we look for it?

I'm going to cross-post this on LtU. I finally created an account there. Ok, here it is.

← Entry 1720Entry 1722 →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

August 2008
SunMonTueWedThuFriSat
 12
3456789
10111213141516
17181920212223
24252627282930
31 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 1 posts

Recent comments XML

Spider solitaire

Dont be silly - there are a great %​that cannot be won - freecell for​examp...

mZex: Aug 4, 6:57am

Generated in about 0.208s.

(Used 8 db queries)

mobile phone