jQuery: The Write Less, Do More JavaScript Library

Ticket #2743 (closed enhancement: fixed)

Opened 2 weeks ago

Last modified 4 days ago

Potpourri of small improvements to code size and perfomance

Reported by: flesler Assigned to: anonymous
Type: enhancement Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords: core event fx selector ajax changes
Cc: Needs: Review

Description

Hi, this diff contains a large set of small changes that make the code slightly shorter. Some might make the code faster.

Most are redundant vars, or redundant ifs. Also declared undefined as local var and replaced all null for undefined, this should be slightly faster, and make the code much smaller.

I exposed the speeds hash (slow,fast), so it can modified/extended. I don't remember them all, but their are mostly small changes.

I ran the test suite on IE6 and FF2 and it passed.

Attachments

potpourri.diff (22.5 kB) - added by flesler 2 weeks ago.
possible changes.txt (325 bytes) - added by flesler 2 weeks ago.
Some more possible changes described

Change History

Changed 2 weeks ago by flesler

Changed 2 weeks ago by flesler

Some more possible changes described

Changed 2 weeks ago by scott.gonzalez

The local undefined variable is faster than the global undefined property, but slower than null. I think keeping the local undefined variable is a good idea, but null should be used where possible.

Changed 2 weeks ago by joern

Sounds like both variations should be send through the benchmark.

Changed 2 weeks ago by flesler

I wasn't really sure about the undefined part, I just added, then you can decide. There're many small changes, you don't need to take them all, some don't even require testing.

Changed 2 weeks ago by flesler

Added most of these changes at [5357]

Changed 4 days ago by flesler

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.