Hi people,

with version 4.9 of my ElfData plugin, my ElfDataStream class (Written in RB), seems to allow for me to beat perl's speed by 2x even on Intel macs. Previously mine was around 4x faster for G5, but on Intel it's only at 2x. Still it's OK. (You can actually test this today, via my plugin at http://elfdata.com/plugin/elfdata.zip )

I am doing a proper comparison unlike Kem Tekinay's one where he did: IsOdd = ( IsOdd = false )

which is blatantly cheating. Mine does exactly the same as the perl one does.

Also, ElfDataStream is an RB made class, competing against a compiled class (TextInputStream), so I will be able to get probably 2x more speed when I make ElfDataStream into an ElfData plugin class.

Sorry for the delay. I've been really, really busy making real money. And I've been trying to figure out some bugs in the ElfDataFuzzy class (invention of mine) for which I'm trying to add Smith-Waterman compatible searching, and it's sort of low level C code trying to do high-level computery science stuff so it's hard to figure out the bugs. And there's no one to help me because I'm inventing it so that slows things down too. Well it's getting there, though. Anyhow, that ElfDataFuzzy bug (now fixed) also slowed down this release of ElfData.

The code is very simple now, unlike last time:

  dim d1, d2 as Double
  dim strIn, fs as ElfDataStream
  dim q1, q2 as ElfData
  dim fi as ElfDataFields

  d1 = ticks

  q1 = 34
  q2 = q1 + q1

  fs = "ElfDataOut.txt"
  strIn = new ElfDataStream( f ) // f is a folderitem
  fi = strIn.Fields

  while strin.MoveLine
    if fi.length = 0 then
      //
    elseif fi.IsInteger then
      fs.AppendString "case "
      fs.AppendElfData fi
    else
      fs.AppendString "r = """
      fs.AppendReplace fi, q1, q2
      fs.AppendByte 34
      fs.AppendByte 10
    end if
    fs.AppendByte 10
  Wend


  fs.Length = fs.Length - 1
  fs = nil // write out and flush stuff!!
  strin = nil

  d2 = ticks
  statusField.text = str( (d2 - d1) / 60 ) + "s"


Oh, the ElfDataStream.rb project is included in my plugin download :) It's in the Examples folder in the elfdata.zip file.

Let me know if you find any problems anyone. I'll fix them right away.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to