« November 2003 | Main | January 2004 »

December 2003 Archives

December 9, 2003

vi must die

I HATE HATE HATE it, when I accidentally hit the CAPS LOCK key and start issuing vi commands. Things go completely out of whack then. The only option then is ESC :e!.

December 15, 2003

MulleAutoreleasePool

So I am sick at home, can't go to work. What do I do ? Code something...

I had this idea for a NSAutoreleasePool implementation, that I figured would be faster than what Foundation offers. Actually it isn't even sporting. You write down some straightforward code, measure and win. :) It's that easy. Foundation needs a little less than 2 minutes for adding securely retained objects and releasing them (the object is never ever deallocated). And the MulleAutoreleasePool code does it in 9 seconds...

2003-12-15 16:00:51.160 MulleAutoreleasePool[26323] Preparing 10000 objects...
2003-12-15 16:01:00.881 MulleAutoreleasePool[26323] Adding 100000000 objects to NSAutoreleasePool
2003-12-15 16:01:11.756 MulleAutoreleasePool[26323] Killing NSAutoreleasePool
2003-12-15 16:02:54.987 MulleAutoreleasePool[26323] Adding 100000000 objects to MulleAutoreleasePool
2003-12-15 16:02:58.324 MulleAutoreleasePool[26323] Killing MulleAutoreleasePool
2003-12-15 16:03:03.380 MulleAutoreleasePool[26323] Done
Well, well well. Things look a bit differently though, if we reduce the number of objects to a tenth. Now the MulleAutoreleasePool does it in a second, whereas Foundation "only" used 2 1/2 s.
2003-12-15 16:07:18.969 MulleAutoreleasePool[26332] Preparing 10000 objects...
2003-12-15 16:07:19.971 MulleAutoreleasePool[26332] Adding 10000000 objects to NSAutoreleasePool
2003-12-15 16:07:20.894 MulleAutoreleasePool[26332] Killing NSAutoreleasePool
2003-12-15 16:07:22.357 MulleAutoreleasePool[26332] Adding 10000000 objects to MulleAutoreleasePool
2003-12-15 16:07:22.682 MulleAutoreleasePool[26332] Killing MulleAutoreleasePool
2003-12-15 16:07:23.180 MulleAutoreleasePool[26332] Done
For whatever reason at a certain amount of objects NSAutoreleasePool really slows down a lot.

There is no point at which NSAutoreleasePool overtakes MulleAutoreleasePool. Unfortunately for me, I thought I could cleverly optimize the "releasing of the pool objects" code , but instead its my "adding an object to the pool" code that is much better.

So expect an article in the Optimizing Objective-C series sometime in the near or distant future. Though feature complete I'd like to stick the MulleAutoreleasePool in a few threaded apps and see if it behaves well. (It should).

iTunes Music Store - 25 Million Songs

Apple announced that the iTunes Music Store has now sold over 25 million songs since its launch in April 2003.

The 25 millionth song -- which was purchased on Friday afternoon was Satan My Master by Bathory.

Apple also released that over $1 million in iTunes online gift certificates and allowances have been purchased since their addition on October 16th, 2003.

December 16, 2003

GnuSTEP NSAutoreleasePool

Well, I figured a bit late that Gnustep oughta have its own implementation of NSAutoreleasePool, so I am just downloading and see how that works...

Well first of all it's way of adding objects to the pool is actually identical to the way I did.

They also seem to optimize the creation of autorelease pools, by not actually freeing old instances of a thread but keeping them around. Now I don't know... At first I thought that would be superflous, as I rarely ever allocate NSAutoreleasePools. But if you have loops where you create and destroy them often to conserve memory it could be conceivably worth it. I'd bet that this has no measureable effect whatsoever, except in synthetic benchmarks. Which .. makes it worth it :)

Deallocation of pooled objects is implemented naively in GNUstep :).

So I'd expect that the MulleAutoreleasePool would handily beat the GNUstep NSAutoreleasePool when the pool contains many objects. The NSAutoreleasePools for each thread are stored in the pthread's (actually cthread's) thread dictionary. I have no idea if this is faster or slower than what I did. I used my own local dictionary, indexed by pthread_self. Gotta peek into Darwin for this.

December 19, 2003

Started writing opti-8, IMP Caching Deluxe With Foundation

I think it's gonna be a good one :) I will probably get it out around christmas. Since I have two long train rides coming up, these will be the perfect time for laying down the words then.

December 20, 2003

HyperEdit

So far I have usually typed my articles in TextEdit. Then I took a previous article and copy and pasted in the new contents usually using OmniWeb. OmniWeb's source view is very slow with long texts and it's also very crash prone and I too often lost my work.

A very nice replacement so far has been Tumult HyperEdit which also has a nice looking icon. (I have no idea though, what it's supposed to mean) If you want to edit HTML pages together with a CSS file with an immediate preview, this is the program you should give a try.

December 21, 2003

HFS+ for Linux

There is now a full featured HFS+ Linux driver out apparently. I haven't tried this yet. Might come in useful if I could share this via NFS between my Linux box and my Mac. Seems like netatalk would come in handy, but I suspect they won't be able to deal with a native HFS+ :)

December 23, 2003

December 25, 2003

IMP Caching Deluxe might become something else

Been busy writing it. Went into a dead end with r12 caching. (Won't work reliably) Got another idea while researching some stuff. Currently looking into optimizing objc_msgSend itself a little...

Good to have some free time just playing around with nutty concepts. Don't panic, a juicy article will come out either way, I believe. :)

December 28, 2003

Finished up what will now become Part 3.1

Features a coding technique that reaps at least a 10% advantage on standard method calls in Objective-C.

Then there is the academic piece, that is also pretty much completely written. Might turn up as part 8 or 9. This features another 15% speed increase on method invocation, at least on G3 processors.

Comparsion between Opteron and G5

Hilarious, the G5 was beaten in a Photoshop test. I thought this was impossible, but maybe they used some procedures which do not require Altivec. The G5 nevertheless scored well in the only benchmark that counts, which is of course Quake 3 :)

Yeah, it's off Slashdot. I do anything to get this webpage filled :)

The academic piece (see: Finished up what will now become Part 3.1)

... and about 20% on a G5. I was pleasantly surprised.

December 29, 2003

Hmm Hmm. Convenience in a bundle for € 39

On a whim I bought the DSL-Router Trendnet TW100-S4W1CA a cheap little thingy because I am getting sick of my Linux box serving basically just as a DSL router. It used to serve NFS, but Apple wore me down with it's incabable NFS code, that kernel panics just too much. The Linux box, an old AMD K6-400 takes too much power and it's too noisy.

I bought the router from Atelco. It was the last box left. Never buy the last box left...

Well I did. Sure enough it was a returned router. Some idiot "Rainer" had already set up the box and entered a password. After probably failing to get it to connect with T-Online he returned it and now I have it. That preempted my "easy Web Setup" and I put the handy Quick Setup Wizard to the task - only available on Windows...

But! The Quick Setup Wizard also required the password! After perusing the documentation I noticed that "Rainer" had 111 written into the dialog boxes. Bingo! 111 was the password. (One can reset to factory defaults by pressing Reset five seconds, but I learned that later).

The Windows setup then had me sweating for a minute, because you can't use it to setup a T-Online DSL account. The dialog box to hold the username is simply too small for T-Onlines massive 42 character user. That's I guess why "Rainer" returned the router. Luckily the Web Interface is much better than the Windows client in all cases except the setting the server name, where the HTTP interface always insists on truncating the last character <grunt>
Connecting to T-Online via PPPOE then went flawlessly.

Actually I am impressed, with what you can get for € 39. It has DHCP (even static!), NAT, a simple Firewall, port forwarding and even dynamic DNS support. I have turned my Linux server off, ah blessed silence. The only sound I hear now is that damned Radeon 9800 card, which I will silence soon with a Verax fan.

This is sweet. I opened up port 22 and port 9 in the router to pass through to my G5. I let the router "Always connected" to T-Online, keeping my dynamic IP current on DynDNS. Now with the help of Broadband Reports I can send a wakeup packet to my G5 and then ssh into it. If the setup is idle, it shouldn't waste more than 15 W.

Next I will buy two cheap 11 mbs bridges for €100 total to get rid of the cable going from the router to my machine room. I hope it will be as easy to setup.

Can't recommend the TW100-S4W1CA yet, as I have little working experience. The only thing missing offhand is the ability to create a local DNS server with a little /etc/hosts table.

December 30, 2003

Obj-C Optimization: The faster objc_msgSend released

http://www.mulle-kybernetik.com/artikel/Optimization/opti-9.html

Get it you hungry performance hounds. :)

Obj-C Optimization: Giving [] a boost released

http://www.mulle-kybernetik.com/artikel/Optimization/opti-3-boost.html

Not too shabby, with real world use.

December 31, 2003

Experience with the DWL-700AP as a Wireless Client

Pro:
  1. Cheap € 49!
  2. Can act as an Access Point, as a Repeater and as a Wireless Client too
  3. Seems to work
  4. Strong enough for the entire house. The Access Point is placed in the middle story and all rooms and most of the garden gets covered.
  5. Looks nice
  6. Can be wall mounted

Contra:

  1. No useful documentation available, for Repeater and Wireless Client
  2. Pressing Reset or Reset to Factory Defaults in the HTTP interface both wipe your settings. Grr.
  3. Close to no diagnostic tools.
  4. DHCP can't do static assignments
  5. HTTP user interface badly executed
  6. Case is sloppily manufactured

If you want a DWL-700AP as a Wireless Client with WEB encryption, you need to set Authentication in http://192.168.0.50/h_wireless.html to Shared Key. Open System might also work, but Auto reliably fails.
Don't go crazy with the local IP settings just give both a unique IP on your local net.
Otherwise you don't need any magic.

For the price I think its a good deal.

Bad things about the DSL Router Trendnet TW100-S4W1CA

  1. Doesn't work with Safari for some strange reason.
  2. Apparently sometimes fails to update the IP to DynDNS automatically
  3. The Barricade SMC7004VBR V.2 appears to be the much better device for the same price <sigh>
  4. Can only deal with DYNDNS. You can't put in a custom URL.

About December 2003

This page contains all entries posted to Nat!'s Web Journal in December 2003. They are listed from oldest to newest.

November 2003 is the previous archive.

January 2004 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 4.25