summaryrefslogtreecommitdiffstats
path: root/generic/tclHash.c
Commit message (Collapse)AuthorAgeFilesLines
* micro-opt of hash lookups found by drhMiguel Sofer2015-09-221-1/+1
|
* Reduce amount of unreachable code. Refactor Win socket and load code to be lessdkf2012-04-051-1/+3
| | | baroque in its internals.
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-10/+10
| | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * [Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2,nijtmans2011-01-251-17/+17
| | | | | | | | | | | | backported strcpy->memcpy change but not change in any struct.
| | * * generic/tclListObj.c (Tcl_ListObjReplace): use memmove() insteaddas2004-11-111-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of manual copy loop to shift list elements. Decreases time spent in Tcl_ListObjReplace() from 5.2% to 1.7% of overall runtime of tclbench on a ppc 7455 (i.e. 200% speed increase). [Patch 1064243] * generic/tclHash.c: hoisted some constant pointer dereferences out of loops to eliminate redundant loads that the gcc optimizer didn't deal with. Decreases time spend in Tcl_FindHashEntry() by 10% over a full run of the tcl testuite on a ppc 7455. [Patch 1064243]
| * | [Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2,nijtmans2011-01-251-7/+7
| | | | | | | | | | | | backported strcpy->memcpy change but not change in any struct.
| * | [Bug 3007895]: Tcl_(Find|Create)HashEntry stub entries can never be called.nijtmans2010-12-311-4/+25
| | | | | | | | | | | | | | | | | | They still cannot be called (no change in functionality), but at least they now do exactly the same as the Tcl_(Find|Create)HashEntry macro's, so the confusion addressed in this Bug report is gone. (Backported from Tcl 8.6)
| * | fix [Bug 2308236] signature of Tcl_HashStats() wrongnijtmans2008-11-181-2/+2
| | |
* | | [Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2nijtmans2010-12-101-7/+7
| | |
* | | fix gcc 64-bit warnings: cast from pointer to integer of different sizenijtmans2010-12-011-4/+4
| | | | | | | | | | | | fix gcc(-4.5.2) warning: 'static' is not at beginning of declaration
* | | [Bug 3007895] Tcl_(Find|Create)HashEntry stub entries can never be called.nijtmans2010-08-241-6/+26
| | |
* | | [ tcl-Feature Requests-2958832 ] Furthernijtmans2010-02-251-5/+9
| | | | | | | | | | | | | | | | | | speed-up of ouster-hash function. Eliminate various unnecessary (ClientData) type casts.
* | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-5/+5
| | |
* | | Return to using the classic hash function. Now with *extensive* notes in thedkf2010-02-171-14/+32
| | | | | | | | | | | | comments about why this function is preferred.
* | | Forgot the magic bias values. FNV is wildly magical...dkf2010-02-101-2/+2
| | |
* | | Minor corrections as recommended by Joe English.dkf2010-02-091-4/+4
| | |
* | | Upgrade Tcl's hash function to use the FNV-32 algorithm. This is marginallydkf2010-02-071-20/+13
| | | | | | | | | | | | | | | faster and gives a bit better distribution of keys (especially in large hash tables) but does change hash iteration order.
* | | * generic/tclBinary.c: Removed unused variables.dgp2009-07-161-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclIOUtil.c: * generic/tclVar.c: * generic/tclBasic.c: Silence compiler warnings about ClientData. * generic/tclProc.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200]
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-8/+9
| | | | | | | | | | | | etc.)
* | | Fix signature and implementation of Tcl_HashStats,nijtmans2008-11-171-7/+3
| | | | | | | | | | | | such that it conforms to the documentation.
* | | Add "const" to many internalnijtmans2008-10-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
* | | * doc/Hash.3: CONSTified the typePtr argumentnijtmans2008-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: of Tcl_InitCustomHashTable. * generic/tcl.h * generic/tclHash.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27.
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-20/+20
|/ /
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | VarReform [Patch 1750051]Miguel Sofer2007-07-311-3/+4
| | | | | | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* | * generic/tcl.h: Removed TCL_PRESERVE_BINARY_COMPATIBILITY anddgp2007-07-021-74/+3
| | | | | | | | | | | | | | | | * generic/tclHash.c: any code enabled when it is set to 0. We will * generic/tclStubInit.c: always want to preserve binary compat of the structs that appear in the interface through the 8.* series of releases, so it's pointless to drag around this never-enabled alternative.
* | Simplify string hashing a little. [FRQ 951168]dkf2007-07-021-14/+2
| |
* | Eliminate use of (VOID*) casts when calling memset or memcpy.dkf2007-04-171-10/+13
| |
* | various "const" additions, in line with TIP #27nijtmans2007-02-201-21/+21
| |
* | * generic/tclCompExpr.c: fix gcc warnings about 'cast to/fromdas2006-11-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEncoding.c: pointer from/to integer of different * generic/tclEvent.c: size' on 64-bit platforms by casting to * generic/tclExecute.c: intermediate types intptr_t/uintptr_t * generic/tclHash.c: via new PTR2INT(), INT2PTR(), * generic/tclIO.c: PTR2UINT() and UINT2PTR() macros. * generic/tclInt.h: [Patch 1592791] * generic/tclProc.c: * generic/tclTest.c: * generic/tclThreadStorage.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/configure.in: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * unix/tclUnixPort.h: * unix/tclUnixTest.c: * unix/tclUnixThrd.c: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* | * generic/tcl.h:Miguel Sofer2006-10-221-70/+11
| | | | | | | | | | | | | | | | * generic/tclHash.c: Tcl_FindHashEntry() now calls Tcl_CreateHashEntry() with a newPtr set to NULL: this would have caused a segfault previously and eliminates duplicated code. A macro has been added to tcl.h (only used when TCL_PRESERVE_BINARY_COMPATABALITY is not set - ie, not by default).
* | Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-7/+7
| |
* | Convert to using ANSI decls/definitions and using the (ANSI) assumption that ↵dkf2005-10-311-93/+86
| | | | | | | | | | | | NULL can be cast to any pointer type transparently.
* | Systematizing the formattingdkf2005-07-211-123/+126
| |
* | * generic/tclListObj.c (Tcl_ListObjReplace): use memmove() insteaddas2004-11-111-5/+8
| | | | | | | | | | | | | | | | | | | | | | of manual copy loop to shift list elements. Decreases time spent in Tcl_ListObjReplace() from 5.2% to 1.7% of overall runtime of tclbench on a ppc 7455 (i.e. 200% speed increase). [Patch 1064243] * generic/tclHash.c: hoisted some constant pointer dereferences out of loops to eliminate redundant loads that the gcc optimizer didn't deal with. Decreases time spend in Tcl_FindHashEntry() by 10% over a full run of the tcl testuite on a ppc 7455. [Patch 1064243]
* | Style guide fixesdkf2004-10-061-24/+20
| |
* | Fix variable usage warning. [Bug 969068]dkf2004-06-081-5/+3
| |
* | Made compiling with -Wstrict-prototypes -Wmissing-prototypes much cleaner.dkf2004-05-271-2/+6
| | | | | | | | Also added support for [FRQ 951168] but left that switched off by default.
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* | More hash function cleaning up.dkf2004-03-301-7/+3
| |
* | All uses of 'panic' (the macro) changeddavygrvy2003-12-241-6/+6
| | | | | | | | | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* | Whitespace fixesdkf2003-11-151-15/+15
| |
* | TIP#138 implementation plus extra test stuff [Patch 731356]dkf2003-11-141-17/+54
| |
* | No more div-by-zero errors. [Bug 759749]dkf2003-06-241-2/+4
|/
* * generic/tclHash.c (HashStringKey): move string++ lower to savehobbs2002-11-121-2/+2
| | | | an instruction.
* * generic/tclHash.c (AllocArrayEntry, AllocStringEntry):hobbs2002-02-261-5/+11
| | | | | | | | Before invoking ckalloc when creating a Tcl_HashEntry, check that the amount of memory being allocated is at least as large as sizeof(Tcl_HashEntry). The previous code was allocating memory regions that were one or two bytes short. [Bug #521950] (dejong)
* * [Patch 505630] Updated interfaces of generic/tclBasic.cc (TIP 27).dgp2002-01-251-2/+2
| | | | | | | * [Patch 506818] Updated interfaces of generic/tclHash.c (TIP 27). * [Patch 506807] Updated interfaces of generic/tclObj.c (TIP 27). * [Patch 507304] Updated interfaces of win/tclWin32.c (TIP 27). * Update all callers.