fluid-work IRC Logs-2008-04-14

[09:59:00 EDT(-0400)] * EricDalquist (n=dalquist@bohemia.doit.wisc.edu) has joined #fluid-work
[10:06:36 EDT(-0400)] * colinclark (n=colin@142.150.154.101) has joined #fluid-work
[10:09:00 EDT(-0400)] * theclown (n=theclown@142.150.154.101) has joined #fluid-work
[10:14:31 EDT(-0400)] * anastasiac (n=team@142.150.154.105) has joined #fluid-work
[11:05:20 EDT(-0400)] * michelled (n=team@142.150.154.197) has joined #fluid-work
[12:26:17 EDT(-0400)] * ecochran (n=ecochran@dhcp-169-229-212-24.LIPS.Berkeley.EDU) has joined #fluid-work
[12:28:50 EDT(-0400)] <ecochran> anyone have opinions about putting todos and tasks into source code? And if you think that it's a good idea, what format do you use. I noticed that ScriptDoc does not have a todo tag.
[12:42:30 EDT(-0400)] <michelled> I think it's only worth putting into code if it doesn't fit into a JIRA
[12:42:44 EDT(-0400)] <colinclark> I prefer JIRAs to todos.
[12:43:00 EDT(-0400)] <michelled> Generally, I try to put everything in JIRA and if it really needs documenting in the code then I refer to the JIRA number
[12:43:08 EDT(-0400)] <colinclark> ecochran: ^
[12:43:20 EDT(-0400)] <michelled> ecochran ^
[12:43:29 EDT(-0400)] <michelled> ha, we both did that!
[12:44:32 EDT(-0400)] <ecochran> thanks, I generally like putting stuff into the code because I'm right in the code at the time that I think of it. Or I'm doing something expedient that I know is a hack and I want to note it right there, in context.
[12:44:58 EDT(-0400)] <ecochran> opening up a JIRA takes too much time and is invisible to anyone else who might be looking at the code
[12:45:40 EDT(-0400)] <ecochran> I started adding Tasks via Aptana/Eclipse but they also seem like they are invisible.
[12:46:16 EDT(-0400)] <ecochran> Also I'm not saying that things shouldn't go into JIRAs, just that JIRAs seem removed from the actual code
[12:47:01 EDT(-0400)] * anastasiac (n=team@142.150.154.105) has left #fluid-work
[12:55:24 EDT(-0400)] <michelled> I agree that when I know I'm writing something not ideal that I like to note it in the code. But I find it's better overall - and more likely to get fixed - if I also create a JIRA for it and refer to it.
[12:56:40 EDT(-0400)] <ecochran> so is there a format that you like to use, or is there a standard that we should all use?
[13:00:38 EDT(-0400)] <michelled> I don't have a preference. If you have one I'd be happy to conform to it.
[13:02:04 EDT(-0400)] <ecochran> usually I just do //TODO: blah, blah, blah. But I'm thinking of extending ScriptDoc and adding @todo: to the function documentation. Although I suppose that's bad because a ScriptDoc parser might choke
[14:11:26 EDT(-0400)] * Bosmon (n=Antranig@ginger.caret.cam.ac.uk) has joined #fluid-work
[14:11:39 EDT(-0400)] <Bosmon> I am starting on some JS performance testing
[14:11:50 EDT(-0400)] <Bosmon> This is FF 1.5 on a reasonably old Windows box:
[14:12:00 EDT(-0400)] <Bosmon> Function call: 1.6us
[14:12:20 EDT(-0400)] <Bosmon> New Object ( {} expression): 6.2us
[14:13:14 EDT(-0400)] <Bosmon> Ok, make that more like 12us
[14:13:32 EDT(-0400)] <Bosmon> Making 100K of them will bring in the associated garbage costs
[14:13:43 EDT(-0400)] <Bosmon> an "indexOf" for short strings, 16us
[14:14:01 EDT(-0400)] <Bosmon> a "substring" + string equality, 25us
[14:15:42 EDT(-0400)] <Bosmon> One empty loop iteration, 0.15us
[14:15:51 EDT(-0400)] <Bosmon> Javascript function calls are expensive, is news #1 (tongue)
[14:15:58 EDT(-0400)] <Bosmon> But then given we know what they do, this is no real surprise
[14:16:07 EDT(-0400)] <Bosmon> A function call is around 10x a "normal op"
[14:16:14 EDT(-0400)] <Bosmon> With an object construction running 10x that again
[14:16:25 EDT(-0400)] <Bosmon> It's a bit like java in 1996 (smile)
[14:19:50 EDT(-0400)] <Bosmon> OK, in most recent Opera, the news is "broadly" consistent
[14:20:03 EDT(-0400)] <Bosmon> Although all the "expensive" operations are roughly 2x faster across the board
[14:20:11 EDT(-0400)] <Bosmon> Some of them 3x faster
[15:03:07 EDT(-0400)] <michelled> Bosmon: yes, I knew about function calls being expensive. Colin mocked me by saying I was trying to factor away the language.
[15:05:12 EDT(-0400)] <Bosmon> Oh
[15:05:16 EDT(-0400)] <Bosmon> What did he, or you mean by that? (tongue)
[15:27:33 EDT(-0400)] <michelled> you'd have to ask him (smile)
[15:31:48 EDT(-0400)] * theclown (n=theclown@142.150.154.101) has joined #fluid-work
[15:32:49 EDT(-0400)] * michelled (n=team@142.150.154.197) has left #fluid-work
[16:13:48 EDT(-0400)] * colinclark (n=colin@142.150.154.101) has joined #fluid-work
[16:29:58 EDT(-0400)] * anastasiac (n=team@142.150.154.105) has joined #fluid-work
[16:30:31 EDT(-0400)] * davidb (n=davidb@142.150.154.101) has joined #fluid-work
[16:47:55 EDT(-0400)] <Bosmon> Ah, I have also discovered this post on the speed of join() vs. repeated string concatenation to be folkloric
[16:48:21 EDT(-0400)] <Bosmon> In both FF and Opera, a join of an array of 10 Strings is around twice as slow as 10 concats
[16:48:34 EDT(-0400)] <Bosmon> Which is pretty impressive, since the strings were all the same reference
[16:48:57 EDT(-0400)] <Bosmon> Therefore in theory the concat should involve the creation of 10 new object references, whilst the join should involve just 2