summaryrefslogtreecommitdiff
path: root/rts/RtsSymbolInfo.c
diff options
context:
space:
mode:
authorCrazycolorz5 <Crazycolorz5@gmail.com>2019-01-20 19:26:58 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-12-11 14:12:17 -0500
commitf80c4a66ae219afa7bd4172441f4e94ba649c9d9 (patch)
tree34c3aa2cc484ade9b2460ca18941763fcb101fcc /rts/RtsSymbolInfo.c
parent6e47a76a3d0a7b3d424442914478de579a49363c (diff)
downloadhaskell-f80c4a66ae219afa7bd4172441f4e94ba649c9d9.tar.gz
rts: Specialize hashing at call site rather than in struct.
Separate word and string hash tables on the type level, and do not store the hashing function. Thus when a different hash function is desire it is provided upon accessing the table. This is worst case the same as before the change, and in the majority of cases is better. Also mark the functions for aggressive inlining to improve performance. {F1686506} Reviewers: bgamari, erikd, simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #13165 Differential Revision: https://phabricator.haskell.org/D4889
Diffstat (limited to 'rts/RtsSymbolInfo.c')
-rw-r--r--rts/RtsSymbolInfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/RtsSymbolInfo.c b/rts/RtsSymbolInfo.c
index 0553308f36..1110d582d6 100644
--- a/rts/RtsSymbolInfo.c
+++ b/rts/RtsSymbolInfo.c
@@ -93,7 +93,7 @@ static void unmarkImport(SymbolInfo* info)
/* -----------------------------------------------------------------------------
* Marks the symbol at the given address as weak or not.
* If the extra symbol infos table has not been initialized
-* yet this will create and allocate a new Hashtable
+* yet this will create and allocate a new StrHashtable
*/
void setWeakSymbol(ObjectCode *owner, const void *label)
{
@@ -103,7 +103,7 @@ void setWeakSymbol(ObjectCode *owner, const void *label)
/* -----------------------------------------------------------------------------
* Marks the symbol at the given address as import or not.
* If the extra symbol infos table has not been initialized
-* yet this will create and allocate a new Hashtable
+* yet this will create and allocate a new StrHashtable
*/
void setImportSymbol(ObjectCode *owner, const void *label)
{
@@ -113,7 +113,7 @@ void setImportSymbol(ObjectCode *owner, const void *label)
/* -----------------------------------------------------------------------------
* Clear the import symbol flag.
* If the extra symbol infos table has not been initialized
-* yet this will create and allocate a new Hashtable
+* yet this will create and allocate a new StrHashtable
*/
void clearImportSymbol(ObjectCode *owner, const void *label)
{