inner muppet's Friends
[Most Recent Entries]
[Calendar View]
[Friends View]
Below are the most recent 8 friends' journal entries.
| Friday, May 25th, 2012 |
edith_the_hutt
|
4:11p |
|
| Monday, May 21st, 2012 |
edith_the_hutt
|
10:04a |
|
pavanne
|
1:03p |
Event Planning
It's our big day tomorrow. Months of invitations agonised over, sent and rsvp'd, room bookings checked, special requests accommodated, speeches prepared, menus selected, and agenda toiled over will all come to a head. We're briefed and steeled and have the dry cleaning all done, and we have people on standby for those last minute changes. Planning is essential, plans are useless, but we've done our best. Yes! It's the Bloomberg New Energy Finance Solar Leadership Forum 2012! And my, will I be glad when it's over and I can start preparing for and looking forward to my wedding with Bjoern. Current Mood: cheerful |
| Saturday, May 19th, 2012 |
edith_the_hutt
|
3:43p |
|
| Wednesday, May 16th, 2012 |
the_lady_lily
|
9:13p |
|
pavanne
|
8:59a |
Very Specific Requests
20 minutes on "The implications of Chinese-Norwegian cooperation on the solar industry?" That's not a presentation topic, that's version of Just a Minute extended well beyond comedy. Current Mood: busy |
| Tuesday, May 15th, 2012 |
benparker
|
12:34p |
In which Ben learns about code optimization the hard way…. I’m currently involved in a project for a paper I’m writing where I’m trying to find the auto-covariance function of a queue, which involves evaluating modified Bessel functions of the first kind; in essence these are the solutions to a particular form of differential equations which tell you how queues work, and each evaluation takes a relatively large amount of time: they are the limiting step in getting towards the answer I’m after in my code. I’m very close to generating the results I think I need to finish the paper, and was getting very frustrated by how slowly the code ran.
For my application, the Bessel function, implemented in matlab and (with a really weird bug initially) in Octave, as besseli is ideal. Essentially, I need to evaluate this over and over again; the Bessel function has two parameters, an index, which in my case is an integer, and another parameter, in my case a positive real number, which is fixed for each function evaluation.
The thing I learnt last night is the extreme time saving in doing things in a sensible order- I’ve had quite a lot of coding training, but to be honest, never really come across situations where using it is needed. So essentially my code was doing this for each z,
out=myOldFunction(z,n,N)
for m=(1:N)
out+=m*(besseli(m-n,z)-besseli(m+n,z) +...% (more functions of besseli)
end
This function has many calls to besseli, each of which is an expensive step. Sometimes we even evaluate the same function twice. By replacing this function with a vectorized call to besseli, we should reduce the overall calls to besseli.
out=myNewFunction(z,n,N)
b=besseli((0:(n+N+50)),z); % <-Vectorized version of besseli
for m=(1:N)
out+=m*(b(abs(m-n)+1)-b(abs(m+n)+1) +...%(more functions of b)
And it’s as simple as that; it helps in this case that the function is symmetric (and besseli(n,z)-besseli(-n,z). The results are that the code runs about four times faster. For those of you that programme more regularly, and as it should have been for me, this is quite obvious. I write this because
- With a little bit of thought, I could have saved myself many hours of computing time, and have finished this paper about a month ago, probably.
- It might help someone else out.
- As a reminder to myself to think carefully about things like this before any serious coding happens.
Originally published at Ben Parker's Blog. You can comment here or there. |
| Sunday, May 13th, 2012 |
pavanne
|
4:07p |
Oxfam Trailwalker Japan
With 3 colleagues from the Tokyo office (Shunsuke, Travis and Ali) I just completed the Oxfam Trailwalker Japan, which is a 100km hike through the mountains near Mount Fuji, in 35 hours 50 minutes. I would not say it was easy, but it was actually surprising how with the right support (we had a team meeting us at the checkpoints to feed us, give us foot massages, and wrap surgical tape around our knees) we managed to walk for that long with a total of 1 hour 45 minutes sleep (I insisted on a couple of power naps). The course was pretty brutally mountainous, and though we breezed through the first 50km in 12 hours, Shunsuke's knees made the second and tougher 50km a painful crawl. Ibuprofen, paracetamol and shochu took us 30km over some of the toughest mountains overnight, which went past in a hiccuping blur. I am pleasantly surprised how effective regular Swiss hikes was as training - I was well able to keep up with my male colleagues, and possibly finished in the best shape, although I was the one insisting on power naps (my brain was jetlagged and felt a whole lot worse than my body). I don't even feel especially tired after a good night's sleep and a soak in an onsen. Naked communal bathing is so much more embarrassing when you strip to reveal layers and layers of surgical tape wrapped around your legs, which takes a long time to peel off. It was really great to spend that much time with my usually distant colleagues, even if it does mean some of them (the support team) now have a mental image of me staggering repeatedly up to a checkpoint and saying brusquely 'homemade onigri and soba... oh you are so kind... is there somewhere I can SLEEP? NOW?' Well, that's one of the purposes of my Asia visit accomplished. Next stop, Shanghai for the largest solar exhibition in the world! Current Mood: energetic |
|